java service

I have a java service and it uses a jar file which I have included in .\packages\webpackage\code\jars\

but when I execute the java service, it throws the error:

ava:48: cannot access com.mypackage.myjava
bad class file: .\packages\webpackage\code\jars\StringLib.jar(com/mypackage/myjava.class)
class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.



This means that the when you compiled classes and created jar file you used a different JVM version.

Now when you are adding the jar file in classpath, and writing java service, you are compiling with JVM other than the later one.

Check the jvm with which you are compiling java service, you can check watt.server.compile property in IS extended settings, change it to the one you used for creating a jar file.