×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    7

    How crossplatform is java.

    I want to make an app with Java MIDP, but how crossplatform is it? Will it work on all devices or just on a select few?

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How crossplatform is java.

    Quote Originally Posted by wooks View Post
    I want to make an app with Java MIDP, but how crossplatform is it? Will it work on all devices or just on a select few?
    Actually depends upon the API that you are using in the app.App developed in Java ME are supported by the multiple devices but app are more or less chosen as per the devices compatibility of the API you are using in your app.

    What app are you developing and what are the platforms are you looking for the app?
    What are the API's you using?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    7

    Re: How crossplatform is java.

    the app will need a whole lot of live internet connectivity and a very responsive user interface.
    can't say more because of an nda.

    I don't really know which api's i'll use because i just started researching the java solution. I was hoping to make a symbian C++ container with the java app in it. But they told me in the symbian C++ forum that that wouldn't work.
    Kind Regards
    Wooks

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How crossplatform is java.

    There are few things that would not work in Java ME too,rather they all workds in Symbain.But I really dont know much about the Symbain, so can not say much more about the C++.

    However after reading your post, I am sure that this can be developed in Java ME and hence you can run this app on the multiple vendors and platforms.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    India, Nashik
    Posts
    816

    Re: How crossplatform is java.

    J2ME socket API would certainly give you better connectivity, for your information J2ME sockets have options like socket for TCP, datagrams for UDP and ready made HTTP too and the J2ME UI components are made in such a way that they can work on any phone so they are quit good and portable, so goahead with MIDP 2.0 and CLDC 1.1 spec most of the devices they have this.

    -Vishal
    Last edited by vdharankar; 2010-05-11 at 19:32. Reason: added more info

  7. #7
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: How crossplatform is java.

    Hello wooks,

    Regarding your original question, here's a more Nokia specific answer: Nokia supports over 200 different devices with the MIDP 2.0 and CLDC 1.1 setup as suggested by vdharankar. These devices include feature phones (Series 40) and smartphones (Symbian), so Java ME bridges across two platforms of different kind.

    More specifically: Nokia devices which support the MIDP 2.0 and CLDC 1.1 setup include: CLDC 1.1 and MIDP 2.0 .

    Furthermore, latest Nokia devices support CLDC 1.1 and MIDP 2.1 setup, i.e. these devices support MIDP 2.0 also if that is used instead of MIDP 2.1 (=backward compatibility).

    So with Java ME (by using it in the previously defined scope), it is possible to develop Java ME applications for the majority of Nokia devices.

    Regarding other Java APIs supported on Nokia devices, here is a related resource on Forum Nokia Java Developer's Library:

    Java Developer's Library 3.5 > Introduction to Java ME on Nokia devices > Java ME support on Nokia platforms > Supported Java APIs

    More generic info about Java ME support on Nokia devices: Java Developer's Library 3.5 > Introduction to Java ME on Nokia devices

    Information on Nokia devices: Home > Devices > All > Device Specifications

    Regards,
    r2j7
    Last edited by r2j7; 2010-05-12 at 00:17.
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    7

    Re: How crossplatform is java.

    thx,

    very usefull links and information.

  9. #9
    Registered User
    Join Date
    May 2010
    Posts
    18

    Re: How crossplatform is java.

    If you develop your application using strictly the Java ME APIs, without using any vendor [Nokia, BlackBerry, Sony etc.] specific APIs, then it will run on any Java enabled devices from any vendor, i.e. the devices should support CLDC and MIDP.

    Only you have to check the CLDC and MIDP versions, as mentioned by the r2j7.
    CLDC 1.1 and MIDP 2.1 are the latest. Regards.

  10. #10
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: How crossplatform is java.

    Quote Originally Posted by nikhil_shravane2004 View Post
    If you develop your application using strictly the Java ME APIs, without using any vendor [Nokia, BlackBerry, Sony etc.] specific APIs, then it will run on any Java enabled devices from any vendor, i.e. the devices should support CLDC and MIDP.
    That's the case in theory, but not in reality. Even if you do this, it is not as clear cut, because there are device-specific issues (different behaviour of the JVM/JSRs, different screensizes, different amounts of memory, different JSRs selected by different manufacturers for different devices, etc., and so on).

  11. #11
    Registered User
    Join Date
    May 2010
    Posts
    18

    Re: How crossplatform is java.

    Yes petrib, I agree with you. I read the "Java Porting" which tells that Java is not exactly the cross-platform. Does that mean, devices which shows support to MIDP and CLDC, is not actually supporting them completely?
    For e.g. Consider any particular device from Nokia, Sony, BlackBerry all 3 are supprting the CLDC 1.1 and MIDP 2.0. And if I have a midlet which is also developed using CLDC 1.1 and MIDP 2.0. But still the application will look different on each of 3 devices. It clearly shows that devices claiming that they supports these standards, actually failed to give full support? OR// these standards themselves are not compatible enough?

  12. #12
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: How crossplatform is java.

    The standards have both mandatory and optional features. Sometimes even the mandatory features are implemented according to the spec, but because the spec might not be explicit enough, the implementations may differ (there could be more than one correct interpretation of what the spec means).

    Some additional JSR's try to clarify that, such as JSR-185 ( http://www.jcp.org/en/jsr/detail?id=185 ) and JSR-248 ( http://www.jcp.org/en/jsr/detail?id=248 ), but even that is not always enough.

    Hardware limitations (real or just constraints that the device manufacturer has decided to enforce) may also come into play (e.g., lack of physical run-time or storage memory, or an upper limit of use of memory/storage that the device manufacturer has set for Java apps).

  13. #13
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How crossplatform is java.

    Another issue is that two devices can implement the same standard perfectly, but differently. Just because they both conform to the same standard does not mean that they will work in exactly the same way.

    For example, if you open a resource file in your JAR:

    Code:
    InputStream in = getClass().getResourceAsStream("/resource.file");
    Then try:

    Code:
    int bytesAvailable = in.available();
    On many devices, this will tell you the length of the resource file. This functionality is entirely conformant to the specification, and many developers come to believe that this is what the available() method is supposed to do. However, the specification does not require the method to do this. On other devices, it will simply return zero, which is also entirely conforming with the specification.

    Another example: some devices will only ever call startApp() once, while others will call pauseApp() and startApp() around an incoming phone call that interrupts the application. Again, both behaviour are permitted under the MIDP specification.

    So, it is easy to make an assumption about how things work, and to find that your assumptions are correct on the handset you're using (in which case, you never realize that it's an assumption). Then you try your app on another handset, and it doesn't work. Since your app works on one device, you assume that there must be a bug on the new handset, but the bug is in fact in your app.

    Font sizes, thread-scheduling algorithms, ... there is a long list of potential implementation variations that can trip you up.

    And of course, the kind of variations that petrib mentions.

    And, many devices do have bugs in their implementation of parts of the specification. However, this is not necessarily your biggest problem.

    Graham.

  14. #14
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105
    Therefore, efforts like J2ME Polish were created …

Similar Threads

  1. -- Java development for S80 with Eclipse --
    By Kalypso in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2011-03-17, 10:35
  2. GUI Libraries for Java ME
    By erik.hellman in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2008-04-11, 11:56
  3. Why is Java the Language of Choice of Most Mobile Game Developers and Not C++?
    By lightninglord2000 in forum General Development Questions
    Replies: 3
    Last Post: 2008-02-19, 18:00
  4. J2ME MIDlet is limited, why not Java applications on mobile?
    By chen_lin99 in forum Mobile Java General
    Replies: 11
    Last Post: 2007-12-29, 01:15
  5. j2ME, java enabled, and the 3410
    By davidkangaroo in forum Mobile Java General
    Replies: 2
    Last Post: 2002-07-05, 22:30

Posting Permissions

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