4

I actually developing J2ME project using S60 SDK, my project gives me the error,

Uncaught exception!
com.ibm.oti.error.LinkageError: (com/yoke/symbian/YokeApp) bad major version at offset=6
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.nokia.mj.impl.vmport.VmPort.Class_forName(VmPort.java:71)
    at com.symbian.j2me.midp.runtimeV2.Application.constructAction(Application.java:490)
    at com.symbian.j2me.midp.runtimeV2.Application.startRequest(Application.java:435)
    at com.symbian.j2me.midp.runtimeV2.Application.event(Application.java:304)
    at com.symbian.j2me.midp.runtimeV2.ApplicationEvent.dispatch(ApplicationEvent.java:90)
    at com.symbian.j2me.midp.runtimeV2.ApplicationThread.run(ApplicationThread.java:30)
-VM verbose connection exited

Because I'm changing compliance level of project from 1.3 to 1.6 (I've installed) from ProjectProperties -> Javacompiler.

Basically when I'm creating new project from git repository it default comes with compliance level 1.3 so, I changed it.

Because in two classes I'm using String... & @SuppressWarnings("rawtypes")

This error continue if I change back compliance level to 1.3.

I don't understand why it's happening. I exactly can't sort out. But the only way I found is to create new project.

Please help.

gnat
  • 6,213
  • 108
  • 53
  • 73
MobileEvangelist
  • 2,583
  • 1
  • 25
  • 36
  • 1
    not sure I understand a single sentence in the question but using anything close to JRE1.6 for java-me development is a bad idea. Anything beyond java version 1.3 is not really supposed to work. java-me is based on java v1.2 and the language had a major compatibility break at v1.5 – michael aubert May 25 '12 at 09:30
  • Actually i'm new to this so, i don't know more about it. I'm currently running with S60 SDK on Eclipse ME for development so, what suold i do? – MobileEvangelist May 25 '12 at 11:02
  • This error occurred when i actually change Compliance level of project for the code i'm using some annotations"@SuppressWarnings("rawtypes")" it shows in suggestions to change compliance of project to 1.5 when i did after that my project is not running properly. sometimes give me Symbian error code 30472 & after some time Linkage Error. I don't understand why it's happening. – MobileEvangelist Jun 07 '12 at 07:15

2 Answers2

3

Stop using annotations and go back to Compliance level 1.3.

java-me development does not support Compliance level 1.5.

java-me code does not support annotations.

michael aubert
  • 6,836
  • 1
  • 16
  • 32
  • thanks for reply. But how i'm using StringTokenizer from 1.5. So, how i do that without. – MobileEvangelist Jun 07 '12 at 12:37
  • StringTokenizer is also not supported in java-me. post some source code to show how you are using it and we can try to suggest java-me compliant alternatives. – michael aubert Jun 07 '12 at 21:20
  • i download 1.3 and install ans set environment variable, also add that jre to preference -> Java -> installJREs. so now that will added to build path of new project but it's not happening if i use Comparator class it ask me to add 1.3 jre to build path. i add it but still showing error that " NoClassDefinationFound for java/util/Comparator ". i don't understand why its happening – MobileEvangelist Jun 08 '12 at 09:02
  • Go to http://www.jcp.org/en/jsr/all JSR 139 and JSR 118 will tell you what classes you are allowed to use for java-me development. – michael aubert Jun 08 '12 at 11:25
  • I've CLDC-javadoc i read it it's also don't contain any of these classes and as you know that if i add external jar it gives error mark. I've tried for collections.jar which include these classes. i posted another question for this problem [Link]("http://stackoverflow.com/questions/10946541/shows-noclassdefinationfound-for-java-util-comparator-though-added-jre-to-buil/10946876#10946876") – MobileEvangelist Jun 08 '12 at 12:39
  • how should i use Comparator in my class as it's not part of CLDC package java.util please help.. – MobileEvangelist Jun 08 '12 at 16:29
1

I actually solve that error and now using jdk1.3 for projects in eclipse. thanks to QuickRecipesOnSymbianOS.

I've download and install jdk1.3.3 and supply it in eclipse preferences ->Java -> Installed JREs (path of the folder containing installed jdk). Instead of providing jre folder provide complete jdk folder. It will added to build path of your project.

After installation don't forget to set environment variable.

MobileEvangelist
  • 2,583
  • 1
  • 25
  • 36