java.lang.UnsupportedClassVersionError: com/aspose/cells/WorkbookDesigner (Unsupported major.minor version 49.0)

I am using jdk 1.4 and Aspose.Cells for exporting data to an excel sheet but i am getting exception

I am using Aspose.Cells verion 1.9.4

java.lang.UnsupportedClassVersionError: com/aspose/cells/WorkbookDesigner (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at com.sg.b2s.launcher.rc.ExcelExportHelperTest.testGetInstance(ExcelExportHelperTest.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Hi,

Could you give us your environment details, OS, exact JDK version etc? we will look into your issue and get back to you soon.

Thank you.

Hi

I am working in Windows XP os and Java version is 1.4.2_08 (j2sdk1.4.2_08).

And I have tried with Aspose.Cells versions -aspose-cells-1.9.4.jar and aspose-cells-2.0.0.jar . And in eclipse this is working perfectly fine .But if you compile without eclipse and in Junit testing this is throwing exception.

Thanks & regards

Hi,

Thank you for sharing the details.

We have checked our released versions and fixes from 1.9.4 to 2.0.1 and we found no problem in any of the release / fix. In Aspose.Cells for JDK1.4, class versions are 48, not 49 (as mentioned in your exception stack). We think maybe you are using the version provided for JDK1.5 and running it with JDK1.4. Please make sure that you are using the right version. We provided two versions in every release archive, one is for JDK1.5 and other is for JDK1.4, you should use the one for JDK1.4 as per your system environment

Thank You & Best Regards,

Hi

Thanks

How can I check the particular jar file for which JDK .And is there any way to check the class verion

Thanks & regards

Hi,

Thank you for considering Aspose.

To get the right version for corresponding JDK, the simplest way is to open the archive you downloaded (Aspose.Cells.zip) and you will see two folders First for JDK 1.4 and Second for JDK 5.0. For your system, you should extract the zip file in JDK 1.4 folder and use the jar in lib folder (Aspose.Cells.jar) and add this jar to your classpath for your application.

Now, to check class version, I think you can extract any one class in the jar and check the file header.

If the first 8 bytes of the class file are:

CA FE BA BE 00 00 00 30 that means the version is 48.

If the first 8 bytes of the class file are:

CA FE BA BE 00 00 00 31 then the class version is 49.

Thank You & Best Regards,