×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    4

    Question Newbie question about jdk versions

    Being new to the J2ME environment I've noticed that sometimes when a midlet can't run on a phone because of a "java/lang/ClassFormatError: Bad version information" error message, the solution is to use the "-target -source" arguments when compiling the midlet.
    Since there are a lot of jdk versions available to download, how do I know which version is right for my phone? Is there a reference somewhere that explains this? Could someone explain to me how this goes?
    Any guidance is much appreciated,
    Thanks

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Newbie question about jdk versions

    Hi thatch8,

    AFAIK JME uses a stripped-down version based on J2SE 1.3, so your your compatibility switches should be configured regarding that.

    Hope this helps!
    Juarez Alvares Barbosa Junior - Brazil

  3. #3
    Registered User
    Join Date
    Apr 2007
    Location
    Taipei
    Posts
    22

    Re: Newbie question about jdk versions

    Are you compiling for the profile MIDP 2.1? maybe your mobile only supports the MIDP 2.0, or even the 1.0

    Customize it and try again

  4. #4
    Registered User
    Join Date
    Jun 2007
    Posts
    4

    Re: Newbie question about jdk versions

    Thanks for the responses, I appreciate it!
    Quote Originally Posted by juarezjunior
    AFAIK JME uses a stripped-down version based on J2SE 1.3 ...
    If there's one thing that's confusing, it's all these versions ... but the basics of J2ME is version 1.3? Anyway, thanks for the tip, it might be helpful.

    Quote Originally Posted by gregorytaiwan
    Are you compiling for the profile MIDP 2.1?
    No, I'm compiling for MIDP 2.0.

    Even though I can understand that there are differences between MIDP 1.0, 2.0, etc, it's not very clear about the JDK versions since I haven't read it anywhere (somehow I think that I might have missed the fine print, but I don't know). I would think, as a beginner, that if I downloaded WTK 2.5.1 and compiled a midlet with it for the MIDP 2.0/CLDC 1.1 range, that it would work. But no. It's kinda tricky for a beginner like me, but hopefully it'll become clear sometime.

    If anyone can contribute a few more words, I'm sure I won't mind, and thanks anyway!

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Newbie question about jdk versions

    Hi thatch8,

    Apart from the MIDP/CLDC + Optional Packages differences (stack), the code syntax must be compliant with J2SE 1.3. Regarding the classes themselves, note that they are not the same as the ones of J2SE 1.3, JME versions are more simple than the original ones.

    Hope this helps
    Juarez Alvares Barbosa Junior - Brazil

Similar Threads

  1. Dumb newbie question about graphics
    By Caspar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-04-11, 13:15
  2. pure newbie question
    By zhengpei in forum Mobile Java General
    Replies: 2
    Last Post: 2003-10-07, 14:19
  3. Newbie question: What is the call stack?
    By advocatee in forum Symbian
    Replies: 2
    Last Post: 2003-06-22, 05:27
  4. J2ME newbie question
    By luisgonsalves in forum Mobile Java General
    Replies: 1
    Last Post: 2002-08-04, 05:08

Posting Permissions

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