Java .jar not running in unix Java .jar not running in unix unix unix

Java .jar not running in unix


You are trying to run it under an earlier version of Java.

You can compile targeting the correct version, or run under a newer version.


Looks like you're building on Java 7 and then trying to run on Java 5, or something like that. It's not a matter of Windows vs Unix - it's a matter of the version of Java within the operating system.

Ideally, upgrade your Unix system to a recent release of Java - or if you can't do that, change how you're building to use the -target flag in javac to generate appropriate bytecode. You should target the right version of the standard libraries for the environment you need to run in, too.


You are trying to run a program compiled on a newer version of Java on an older version of Java.

Make sure the program is compiled for the appropriate target version that you will be running on. You can set compile options to use a newer compiler to create programs that will run on older versions, but obviously you can't use newer features.

For example: Java 7 runs all previous versions of binaries. Java 5 can't run newer versions of binaries.