File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Problem executing jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem executing jar" Watch "Problem executing jar" New topic

Problem executing jar

Debopam Poddar
Ranch Hand

Joined: Jun 21, 2005
Posts: 51

I have generated jar file from my simple java application.While executing I get following error.I'm using WSAD 5.1 and iText 2.0.8

My contains following entry:
Manifest-Version: 1.0
Main-Class: com.raj.GenerateWordReport
Class-Path: iText-2.0.8.jar

Error log while executing this.
C:\DAILY REPORT>java -jar GenerateReport.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/raj/GenerateWordReport (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at Source)
at Source)
at$100(Unknown Source)
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Amir Pourteymour
Ranch Hand

Joined: Mar 06, 2008
Posts: 45
The JDK version that you used to code and the one you're using to run are different. That's why you should use the same version or use this command while compiling.

javac -source version -target version
I agree. Here's the link:
subject: Problem executing jar
jQuery in Action, 3rd edition