Jar File

Hi AllI am writing a batch file to run a packaged JAR file, What do I need to run a JAR file in a separate or different PC other than my development-PC? Thank you in advanceJotnarta
[209 byte] By [jotnartaa] at [2007-11-26 16:48:48]
# 1

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! :)

maple_shafta at 2007-7-8 23:16:21 > top of Java-index,Desktop,Deploying...
# 2

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?

mildly_odda at 2007-7-8 23:16:21 > top of Java-index,Desktop,Deploying...
# 3

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.

maple_shafta at 2007-7-8 23:16:21 > top of Java-index,Desktop,Deploying...
# 4
Ok, many thanks
mildly_odda at 2007-7-8 23:16:21 > top of Java-index,Desktop,Deploying...