Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

Java - Problem when using WTK

 
Thread Tools Search this Thread
Old 01-14-2005, 02:18 PM   #1
Jade
 
Posts: n/a
Default Problem when using WTK

Hope anyone can helps .... thanks.

I wrote a simple mobile game using J2ME and can compile it without error,
but when i try to launch it, the following message come out and then .....
exit:

Project settings saved
Building "TestingGame"
Build complete
Running with storage root DefaultColorPhone
Method............: 100d2aa8 'com/sun/midp/midlet/MIDletState.createMIDlet
(static)'
Stack Chunk.......: e87cc4
Frame Pointer.....: e87d20
Current IP........: 10128592 = 10128584 + offset 14
Previous Frame....: e87ce4
Previous IP.......: 1012052b (offset 22)
Frame size........: 8 (1 arguments, 7 local variables)
Argument[0].......: e895cc
Local[1]..........: 0
Local[2]..........: e87ce4
Local[3]..........: e987fc
Local[4]..........: e87cf8
Local[5]..........: 100dcdd0
Local[6]..........: e87cc4
Local[7]..........: 1015f0a0
Operand[1]........: e895cc

Method............: 100cd0e4 'com/sun/midp/midlet/Selector.run (virtual)'
Stack Chunk.......: e87cc4
Frame Pointer.....: e87ce4
Current IP........: 1012052b = 10120515 + offset 22
Previous Frame....: 0
Previous IP.......: 1
Frame size........: 6 (1 arguments, 5 local variables)
Argument[0].......: e89810
Local[1]..........: e98a0c
Local[2]..........: e895cc
Local[3]..........: 0
Local[4]..........: 0
Local[5]..........: 0
Operand[1]........: e98a0c

VM status:
Instruction pointer.: 10128592 (offset within invoking method: 14)
Next instruction....: 0x4c
Frame pointer.......: e87d20
Local pointer.......: e87d00
Stack size..........: 128; sp: e87d38; ranges: e87ccc-e87ecc;
Contents of the current stack frame:
e87d00: e895cc (lp)
e87d04: 0
e87d08: e87ce4
e87d0c: e987fc
e87d10: e87cf8
e87d14: 100dcdd0
e87d18: e87cc4
e87d1c: 1015f0a0
e87d20: e87ce4 (fp)
e87d24: 1012052b
e87d28: e87cfc
e87d2c: 100d2aa8
ALERT: java/lang/ClassFormatError: Bad version information.

e87d30: e87cc4
e87d34: 0 (end of frame)
e87d38: e895cc (sp)
Execution stack contains 112 items:
e89810
e98a0c
e895cc
0
0
0
0
1
e87cc8
100cd0e4
e87cc4
0
e98a0c
e895cc
0
e87ce4
e987fc
e87cf8
100dcdd0
e87cc4
1015f0a0
e87ce4
1012052b
e87cfc
100d2aa8
e87cc4
0
e895cc

Execution completed.
441217 bytecodes executed
9 thread switches
486 classes in the system (including system classes)
2483 dynamic objects allocated (73128 bytes)
1 garbage collections (0 bytes collected)
Execution completed.
441217 bytecodes executed
9 thread switches
486 classes in the system (including system classes)
2483 dynamic objects allocated (73128 bytes)
1 garbage collections (0 bytes collected)





  Reply With Quote
Old 01-14-2005, 03:26 PM   #2
Thomas Fritsch
 
Posts: n/a
Default Re: Problem when using WTK

Jade wrote:
> Hope anyone can helps .... thanks.
>
> I wrote a simple mobile game using J2ME and can compile it without error,
> but when i try to launch it, the following message come out and then .....
> exit:
>
> Project settings saved
> Building "TestingGame"
> Build complete
> Running with storage root DefaultColorPhone

[...lots of stuff snipped...]

> ALERT: java/lang/ClassFormatError: Bad version information.

See at
http://java.sun.com/j2se/1.4.2/docs/...rmatError.html
Some guesses what might have happened:
(*) you compiled for java1.5, but your machine expects java1.4
(the class file format changed with 1.3 -> 1.4, and 1.4 -> 1.5)
(*) or your class files were corrupted during transfer
(*) or something completely different...

[...lots of stuff snipped...]
>
>


--
"Thomas:Fritsch$ops:de".replace(':','.').replace(' $','@')

  Reply With Quote
Old 01-16-2005, 05:25 PM   #3
Darryl L. Pierce
 
Posts: n/a
Default Re: Problem when using WTK

Jade wrote:
> Hope anyone can helps .... thanks.
>
> I wrote a simple mobile game using J2ME and can compile it without error,
> but when i try to launch it, the following message come out and then .....
> exit:
>
> Project settings saved
> Building "TestingGame"
> Build complete
> Running with storage root DefaultColorPhone
> Method............: 100d2aa8 'com/sun/midp/midlet/MIDletState.createMIDlet
> (static)'
> Stack Chunk.......: e87cc4


Does your MIDlet have a public, no-arg constructor explicitly defined?

--
Darryl L. Pierce <>
Visit my webpage: <http://mcpierce.multiply.com>
"By doubting we come to inquiry, through inquiry truth."
- Peter Abelard
  Reply With Quote
Old 01-16-2005, 10:42 PM   #4
Jade
 
Posts: n/a
Default Re: Problem when using WTK

Yes ....




"Darryl L. Pierce" <>
???????jyGd.17357$ t...
> Jade wrote:
> > Hope anyone can helps .... thanks.
> >
> > I wrote a simple mobile game using J2ME and can compile it without

error,
> > but when i try to launch it, the following message come out and then

......
> > exit:
> >
> > Project settings saved
> > Building "TestingGame"
> > Build complete
> > Running with storage root DefaultColorPhone
> > Method............: 100d2aa8

'com/sun/midp/midlet/MIDletState.createMIDlet
> > (static)'
> > Stack Chunk.......: e87cc4

>
> Does your MIDlet have a public, no-arg constructor explicitly defined?
>
> --
> Darryl L. Pierce <>
> Visit my webpage: <http://mcpierce.multiply.com>
> "By doubting we come to inquiry, through inquiry truth."
> - Peter Abelard



  Reply With Quote
Old 01-16-2005, 10:59 PM   #5
Darryl L. Pierce
 
Posts: n/a
Default Re: Problem when using WTK

Jade wrote:
> Yes ....


Someone else pointed out that it's a ClassFormatError. This is probably
caused by you using the wrong JDK version. What version are you using
currently?

--
Darryl L. Pierce <>
Visit my webpage: <http://mcpierce.multiply.com>
"By doubting we come to inquiry, through inquiry truth."
- Peter Abelard
  Reply With Quote
Old 01-17-2005, 10:24 AM   #6
Jade
 
Posts: n/a
Default Re: Problem when using WTK

I m using JDK 1.5.0, and J2ME WTK version 2.1
m i using the wrong one? which JDK version i should use???



"Darryl L. Pierce" <>
???????:ZbDGd.19709$ t...
> Jade wrote:
> > Yes ....

>
> Someone else pointed out that it's a ClassFormatError. This is probably
> caused by you using the wrong JDK version. What version are you using
> currently?
>
> --
> Darryl L. Pierce <>
> Visit my webpage: <http://mcpierce.multiply.com>
> "By doubting we come to inquiry, through inquiry truth."
> - Peter Abelard



  Reply With Quote
Old 01-17-2005, 12:20 PM   #7
Darryl L. Pierce
 
Posts: n/a
Default Re: Problem when using WTK

Jade wrote:
> I m using JDK 1.5.0, and J2ME WTK version 2.1
> m i using the wrong one? which JDK version i should use???


JDK 1.4 is the better choice. The bytecodes produced by JDK5 are not in
the right format.

--
Darryl L. Pierce <>
Visit my webpage: <http://mcpierce.multiply.com>
"By doubting we come to inquiry, through inquiry truth."
- Peter Abelard
  Reply With Quote
Old 01-17-2005, 01:44 PM   #8
Thomas Fritsch
 
Posts: n/a
Default Re: Problem when using WTK

Darryl L. Pierce wrote:
> Jade wrote:
>
>> I m using JDK 1.5.0, and J2ME WTK version 2.1
>> m i using the wrong one? which JDK version i should use???

>
>
> JDK 1.4 is the better choice. The bytecodes produced by JDK5 are not in
> the right format.
>


You *can* use JDK 1.5.0, though.
But then you have to compile for the right target, for example:
javac -target 1.4 ...
See also
http://java.sun.com/j2se/1.5.0/docs/...c.html#options
and scroll down to chapter "Cross-Compilation Options".

--
"Thomas:Fritsch$ops:de".replace(':','.').replace(' $','@')

  Reply With Quote
Old 01-17-2005, 02:14 PM   #9
Darryl L. Pierce
 
Posts: n/a
Default Re: Problem when using WTK

Thomas Fritsch wrote:
>>> I m using JDK 1.5.0, and J2ME WTK version 2.1
>>> m i using the wrong one? which JDK version i should use???

>>
>> JDK 1.4 is the better choice. The bytecodes produced by JDK5 are not
>> in the right format.

>
> You *can* use JDK 1.5.0, though.
> But then you have to compile for the right target, for example:
> javac -target 1.4 ...


Except that you can't tell WTK to use that commandline argument. So,
again, JDK5 doesn't produce what's required (by default) and there's no
way to configure WTK to use the commandline to make the JDK produce the
required bytecode format.

Until Sun releases an updated WTK, it's not possible to use JDK5 to do
MIDP development.

--
Darryl L. Pierce <>
Visit my webpage: <http://mcpierce.multiply.com>
"By doubting we come to inquiry, through inquiry truth."
- Peter Abelard
  Reply With Quote
Old 01-18-2005, 03:34 PM   #10
Jade
 
Posts: n/a
Default Re: Problem when using WTK

so ... is the JDK 1.4 still available for download ?


"Darryl L. Pierce" <>
???????:3CQGd.445$...
> Thomas Fritsch wrote:
> >>> I m using JDK 1.5.0, and J2ME WTK version 2.1
> >>> m i using the wrong one? which JDK version i should use???
> >>
> >> JDK 1.4 is the better choice. The bytecodes produced by JDK5 are not
> >> in the right format.

> >
> > You *can* use JDK 1.5.0, though.
> > But then you have to compile for the right target, for example:
> > javac -target 1.4 ...

>
> Except that you can't tell WTK to use that commandline argument. So,
> again, JDK5 doesn't produce what's required (by default) and there's no
> way to configure WTK to use the commandline to make the JDK produce the
> required bytecode format.
>
> Until Sun releases an updated WTK, it's not possible to use JDK5 to do
> MIDP development.
>
> --
> Darryl L. Pierce <>
> Visit my webpage: <http://mcpierce.multiply.com>
> "By doubting we come to inquiry, through inquiry truth."
> - Peter Abelard



  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comcast + Wireless Internet Problem shadoweloc General Help Related Topics 1 07-01-2008 05:19 PM
Dial Up Problem smackedass A+ Certification 3 02-02-2007 10:59 PM
Re: Virus Problem ** Help!** David BlandIII A+ Certification 1 03-02-2004 05:00 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 11:18 AM
Re: Serious Computer Problem Bret A+ Certification 0 11-18-2003 11:51 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47