“A java exception has occurred” when opening .jar

You compiled your jar with a JDK version superior to the JDK used to launch the jar file (you might have compiled with 1.7 and try to run it with 1.6).

2 solutions:

  • If you don’t use specific features of the JDK you use to compile, set its target to the previous version (in the above example add the flag -target 1.6 to you compiler options)
  • Upgrade the JDK used on the client.

Leave a Comment