Hi ,
What could be the reason for the following error? Does words for java need a specific version of java? I’m using java 6.
java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class com.aspose.words.IMailMergeDataSource)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java: 1854)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java: 890)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: 1354)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: 1233)
thanks,
Ashu
Hello
This exception can occur when the source is built targeting a JDK that is not supported by the JDK attempting to run it. In the above example, if the servlet was built targeting only JDK 1.5, but the web server runs JDK 1.4, the above exception will occur.
Check, Project Properties | Build | Java | Target VM, and verify that the Target VM indicates a JDK compatibility that is appropriate for the JDK that is running it. It is recommended to set this field to ‘All Java SDKs’ for the most compatibility. The only reason you would want to specify a particular version is if your code uses language features that only appear in a particular version of the JDK, and you want to ensure that users use only a compatible JDK.
Also check, Project Properties | Build | Java | Language Features, and verify that the Language Features are applicable with JDK that is running it.
Best regards,