Results 1 to 15 of 15
  1. #1
    OmerHalit is offline Member
    Join Date
    Mar 2010
    Posts
    41
    Rep Power
    0

    Default PC and HandPhone...

    Hi,

    If I develop a software with java, can it run on mobile phones too?

    Let's say, I coded a program using NetBeans -> Desktop Java Application with Database and I put it in website. Can I see this application if I connect to that website through my hand phone or PDA?

    I made a simple Application with that way. I copied the .jar file to my PDA's memory, when I try to run, it says "Invalid Java application descriptor (jad)"

    Do we have to code especially for mobile phones or it actually works but i am missing something?

    Thank You.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    JavaME.
    That's the one for mobiles and small devices.
    There'll be a version of it for the device you want to target.

    As for the website thing, I don't quite understand...is this a webapp, or a desktop app for download through the site?

  3. #3
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    Quote Originally Posted by Tolls View Post
    JavaME.
    That's the one for mobiles and small devices.
    There'll be a version of it for the device you want to target.
    Unless it's an iPhone. :D

    -Gary-

  4. #4
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by OmerHalit View Post
    If I develop a software with java, can it run on mobile phones too?

    the api and patterns in j2me looks quite different then those in j2se. look at this simple piece of code and compare it to a HelloWorld code in j2se.

    Java Code:
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    
    public class HelloWorld extends MIDlet{
      private Form form;
      private Display display;
    
      public HelloWorld(){
        super();
      }
    
      public void startApp(){
        form = new Form("Hello World");
        String msg = "Hello World!!!!!!!";
        form.append(msg);
        display = Display.getDisplay(this);
        display.setCurrent(form);
      }
    
      public void pauseApp(){}
      
      public void destroyApp(boolean unconditional){
        notifyDestroyed();
      }
    }

    creating the jad-file is quick done compared to translate your j2se-code for j2me.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    Quote Originally Posted by gcalvin View Post
    Unless it's an iPhone. :D

    -Gary-
    Good point.

    There *may* be a version of it for the device you're targetting...:)

    Also, that version *may* be incompatible with other JavaME versions...

  6. #6
    OmerHalit is offline Member
    Join Date
    Mar 2010
    Posts
    41
    Rep Power
    0

    Default

    So it means that, if I want a software which runs both in pc and handphone, I can't do it by just coding it once and copy here and there..(of corz..! but I thought java could..)

    Ok then, Let me ask this question with another way..

    What would you do if someone asks you to develop a desktop java application which collaborates with online database and integrate it with mobile phones? :( (not iPhone. Java app for mobile.. or a way to run the java desktop app directly on hp like using an emulator... sounds like trying to run tetris on a 12 digit calculator. :D)

    Maybe I should ask this too... : Is it possible?


    Thanks..
    Last edited by OmerHalit; 03-31-2010 at 07:21 PM. Reason: to make it clearer... :)

  7. #7
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    5

    Default

    If you want to create iPhone apps, you need to learn Objective-C.

  8. #8
    OmerHalit is offline Member
    Join Date
    Mar 2010
    Posts
    41
    Rep Power
    0

    Default

    What I had in my mind was to develop a java desktop application. pin it to a website.

    then go to that website from my PDA which uses windows mobile 2003 and see the java application there..

    is this possible?

  9. #9
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by OmerHalit View Post
    What would you do if someone asks you to develop a desktop java application which collaborates with online database and integrate it with mobile phones?

    i would ask for which device and then look which sdk is available for this device. in the device specification you should also see which browser protocols are available and if these protocols are compatible with your online db. by the way, this forum has also a subforum for Java ME. You will find the specials there.

    what mobile phones are you talking about?
    Last edited by j2me64; 03-31-2010 at 08:45 PM.

  10. #10
    OmerHalit is offline Member
    Join Date
    Mar 2010
    Posts
    41
    Rep Power
    0

    Default

    let's say nokia n90 or O2 PDA which supports java and uses windows mobile 6.0
    Last edited by OmerHalit; 03-31-2010 at 08:52 PM.

  11. #11
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by OmerHalit View Post
    let's say nokia n90 or O2 PDA which supports java and uses windows mobile 6.0

    ok, this device supports CLDC 1.1 and MIDP 2.0. nokia recommend S60 Platform SDKs for Symbian OS, for Java™ developers. good luck.

  12. #12
    OmerHalit is offline Member
    Join Date
    Mar 2010
    Posts
    41
    Rep Power
    0

    Default

    So I see that "coding once running twice" is not possible :D If I want my software run on pcs and hps, I have to code it twice..

    Thank you for your helps.. especially j2me64.. :)

    so how come this person could ask me that question?

    Develop a java desktop application which collaborates with online database and integrate it with mobile phones?

    Either he meant something else or he doesnt know what he is saying.. or do you understand something else?

  13. #13
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    Realistically, the "Write Once, Run Anywhere" ideal just doesn't always work. Do you really want your desktop users confined to a tiny screen, for instance? Do you expect your mobile device users to have a full keyboard and mouse?

    -Gary-

  14. #14
    OmerHalit is offline Member
    Join Date
    Mar 2010
    Posts
    41
    Rep Power
    0

    Default

    yeah, it's logical.. thank you for your helps.. I hope to see you in this forum again while healing my another wound.. :D starting a nice path finder java app.. cheers..

  15. #15
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    Do a webapp, assuming the phone has a reasonable browsing capability.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •