This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem executing jar

 
Debopam Poddar
Ranch Hand
Posts: 51
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 Manifest.mf contains following entry:
Manifest-Version: 1.0
Main-Class: com.raj.GenerateWordReport
Class-Path: iText-2.0.8.jar db2java.zip


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 java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown 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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 NameOfClass.java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic