Java ME compile not working
Hi,
I'm experimenting with the Java ME support.
I created a new project and added a new Java me module. Fine so far.
I wrote a MIDlet class and compiled it using idea.
The emulator crahed with a "wrong version" error. Decompiling with JAD tells me the class file is version 50.
I configured the project to use the Java 1.3 compatibility.
How can I fix IntelliJ to compile for the 1.3 vm target?
请先登录再写评论。
Hello,
you should use Mobile SDK with java sdk version 1.3. Please check language
level assigned to the mobile module - it should be 1.4 or 1.3.
If it won't work please send me your .iml file i'll try to investigate the
issue further
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Anna,
thank you for your answer.
I'm using a JDK 6 version. I fixed the issue by adding the compiler options -target 1.4 and -source 1.4, this works fine with the emulator and my mobile device.
I assumed that IntelliJ adds the source and target options automatically because I chose "1.4" in the project settings' source level. Can't IntelliJ do that?
(Now I have another problem, the Junit jar is packaged into the final application. I'll open another thread for that)
Wallaby
Hello,
language level is used to notify IDEA about possible language constructions
and compiler has separate settings: File|Settings|Compiler
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"