Check the version of jar and also your system Java version. If jar version is compatible to the system version it will run.
Moreover, check the Jar by running java -jar filename.jar on the command prompt.
After that do the same thing as mentioned in the above version.
If not please pass your jar and sample code.