Well you will need your jar file of course along with your batch script to execute it.
You will need to package any jars that your jar is dependent upon and make sure that you set your classpath argument in the batch file to include these dependent jar files.
The production (or client) environment must have a JRE that is preferrably the same version that your jar was developed in.
Easy enough! :)
Hi
I may have a related problem. I have got a jar working nicely on my development machine and have sent a copy to a colleague (unfortunately remote from me and not java literate) to try it on a Mac.
In the past he has run java from the Terminal window for me and now I wanted to try a double click launch. Anyway. he seemed to get this generic type of error message for each test I sent him, no matter whether he tried it from the desk top or the terminal window:
"Exception in thread "main" java.lang.UnsupportedClassVersionError: somepackage/SomeJar (Unsupportted major.minor version 49.0)"
The only causes I can think of are
a) it is because I have upgraded to SDK 1.5 since the previous tests
b) something else I don't understand.
Any ideas?
That error message occurs if the JAR file was developed in a J2SE version that is more recent than the JRE version installed on the client or production computer.
Your colleague will have to upgrade his JRE to a more recent version, preferablly the same version that was used to create the JAR.