Java version mismatch

Hi Experts,

Need an urgent solution,

I had updated the solaris recent pacakges in one of the server having Java apps, those patches include the Java fixes too, after the patch the apps are not getting started and throw the following errors.  I will be pleased to have your help. the current Java version is 1.5.

[Loaded java.lang.UnsupportedClassVersionError from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
[Loaded sun.misc.ClassFileTransformer from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
[Loaded from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClassInternal(
[Loaded java.lang.Shutdown from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
[Loaded java.lang.Shutdown$Lock from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]

LVL 10
Who is Participating?
for_yanConnect With a Mentor Commented:
Why would you want to install 1.5 ? Wahtever was compiled with 1.6 should be running on 1.6. Whatever was compiled with 1.5 will also run on 1.6. Why not to run everything on 1.6 ?
chaitu chaituCommented:
try to install 1.5 version again.
BawerAuthor Commented:
actually some how some misunderstanding has been developed between vendor of app and us, the apps are compiled with 1.6 and we are installing 1.5 now coming back to 1.6 and after re installation still the java -version is showing the 1.5
Frank ContrepoisVP Technical SalesCommented:
You or the dev team probably complie the files with java 1.6 as the target version.

Recompile with 1.5 it's generally simpler to do than to upgrade java to 1.6 on the server side
BawerAuthor Commented:
upgraded the version to 1.6 and compiled the problematic app with higher version.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.