Tuesday, December 23, 2008

coldfusion java class verion error Raghuram Reddy

Hi Friends,

Last week, while dealing with the java class through coldfusion, i got the error message like 'Java Class version not supported....'.
At lost Bharathi rectified the issue is with the java class version.
So i compiled the same java file with java1.4 and resolved the issue.
Here are some of the screen shots of them.

(click on images to view in full window)

The moral of the story is 'compile .java files in corresponding Java platform version to get the Java class version.so that you will come out of version compatible problems.

Note: Java class version is major here. ------------------------------------------------

major minor Java platform version
45 3 1.0
45 3 1.1
46 0 1.2
47 0 1.3
48 0 1.4
49 0 1.5
50 0 1.6

(The order of class file components is strictly defined so JVMs can know what to expect, and where to expect it, when loading a class file. For example, every JVM knows that the first eight bytes of a class file contain the magic and version numbers, that the constant pool starts on the ninth byte, and that the access flags follow the constant pool. But because the constant pool is variable-length, it doesn't know the exact whereabouts of the access flags until it has finished reading in the constant pool. Once it has finished reading in the constant pool, it knows the next two bytes will be the access flags.)

Thanks and Regards,

Raghuram Reddy.Gottimukkula,

Adobe Certified Advanced ColdFusion Developer


Special thanks to Bharathi Raja!