Debugging J2ME Midlet projects in IDEA
I have installed J2ME plugin.
Created New J2ME mobile project, selected Sun Java(TM) Wireless Toolkit 2.5.2_01 CLDC and JDK 1.6.0
After that, I added new Midelt class to the project.
Typed in some code, placed a breakpoint and started the debug.
The Console ouput:
Connecting to 127.0.0.1 on port 2800
Waiting for debugger on port 1118
Waiting for KVM...
Connected to KVM
Connection received.
Running with storage root C:\Documents and Settings\Markiz\j2mewtk\2.5.2\appdb\temp.DefaultColorPhone4
Running with locale: -
Running in the identified_third_party security domain
The phone emalutaor poped up, but it is empty.
That's it.
If I try to tun the project without debug, phone emulator displays the application but when I try to open it (in emulator), the emulator shut downs, this is the
log:
Running in the identified_third_party security domain
Method............: 10233084 'com/sun/midp/midlet/MIDletState.createMIDlet (static)'
Stack Chunk.......: 22700ac
Frame Pointer.....: 2270104
Current IP........: 1033a493 = 1033a476 + offset 29
Previous Frame....: 22700cc
Previous IP.......: 103ce339 (offset 22)
Frame size........: 7 (1 arguments, 6 local variables)
Argument[0].......: 22708e0
Local[1]..........: 0
Local[2]..........: 23ee6cc
Local[3]..........: 22800f4
Local[4]..........: 23ee6e0
Local[5]..........: 10274b20
Local[6]..........: 23ee6ac
Operand[1]........: 22708e0
Method............: 10295954 'com/sun/midp/midlet/Selector.run (virtual)'
Stack Chunk.......: 22700ac
Frame Pointer.....: 22700cc
Current IP........: 103ce339 = 103ce323 + offset 22
Previous Frame....: 0
Previous IP.......: 1
Frame size........: 6 (1 arguments, 5 local variables)
Argument[0].......: 2270a70
Local[1]..........: 22801d0
Local[2]..........: 22708e0
Local[3]..........: 0
Local[4]..........: 0
Local[5]..........: 0
Operand[1]........: 22801d0
VM status:
Instruction pointer.: 1033a493 (offset within invoking method: 29)
Next instruction....: 0x4c
Frame pointer.......: 2270104
Local pointer.......: 22700e8
Stack size..........: 128; sp: 227011c; ranges: 22700b4-22702b4;
Contents of the current stack frame:
22700e8: 22708e0 (lp)
22700ec: 0
22700f0: 23ee6cc
22700f4: 22800f4
22700f8: 23ee6e0
22700fc: 10274b20
2270100: 23ee6ac
2270104: 22700cc (fp)
2270108: 103ce339
227010c: 22700e4
2270110: 10233084
2270114: 22700ac
2270118: 0 (end of frame)
227011c: 22708e0 (sp)
Execution stack contains 108 items:
2270a70
22801d0
22708e0
0
0
0
0
1
23ee6b0
10295954
22700ac
0
22801d0
22708e0
0
23ee6cc
22800f4
23ee6e0
10274b20
23ee6ac
22700cc
103ce339
22700e4
10233084
22700ac
0
22708e0
Execution completed.
3421922 bytecodes executed
453 thread switches
1668 classes in the system (including system classes)
17659 dynamic objects allocated (531496 bytes)
2 garbage collections (460512 bytes collected)
Execution completed.
3421922 bytecodes executed
453 thread switches
1668 classes in the system (including system classes)
17659 dynamic objects allocated (531496 bytes)
2 garbage collections (460512 bytes collected)
ALERT: java/lang/ClassFormatError: Bad version information.
Process finished with exit code 127
请先登录再写评论。
Hello,
Could you please check that you've set language level to 1.4?
Thank you
1.4 did help for regular run,
but when I try to run debugger, nothing happens (I don't even get an error) the phone emulator starts but it doesn't load the application.
BUMP
I have the exact same problem - http://devnet.jetbrains.net/thread/290406
However, setting the level to 1.4 doesnt work it seems - if I did it correctly. Where exactly am I supposed to set the level?
Language level should be set for a J2ME module in File|Project Structure
Could you please try to set jdk 1.4 as well? And what is the new stacktrace?
JDK 1.4??
Why can't it work with 1.6?
I will download it and test it.
Ok, this is the log starting debug on 1.4:
Connecting to 127.0.0.1 on port 2800
Waiting for debugger on port 1309
Waiting for KVM...
Connected to KVM
Connection received.
Running with storage root C:\Documents and Settings\markiz\j2mewtk\2.5.2\appdb\temp.DefaultColorPhone36
Running with locale:
Running in the identified_third_party security domain
-------------------------
The phone is "empty", nothing on it's screen.
BUMP