This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 49

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
jQuery in Action, 2nd edition
subject: Problem executing jar
Similar Threads
while running junit it is throwing java.lang.Unsupported Class Version Error
xxxx.jar seen as on desktop and won't run
Exception in thread "main"
gettin error while running program
Inquisition: SCWCD mock questions