LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-30-2006, 10:48 AM   #1
icebyte
LQ Newbie
 
Registered: Mar 2006
Location: norway
Distribution: debian
Posts: 15

Rep: Reputation: 0
My .jar files wont install


Hi

I created a tiny program to just see if the .jar file would install on my system which it didnt. Below is the out messages i got when issuing this command: java -jar Myprogram2.jar

Output from the command:
Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: myprogram2/Main (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Why am i getting these error messages and what can i do to solve this problem? If someone could help then that would be nice If i create a program i want it to be able to install it on the system though
 
Old 04-30-2006, 11:03 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Hi!

You may have to create a manifest file in order to make your jar file an executable. Take a look in here:

http://csdl.ics.hawaii.edu/~johnson/...jar-files.html

Some IDE's has the ability to create an executable jar file for you, such as Eclipse and BlueJ

Regards!
 
Old 04-30-2006, 11:14 AM   #3
icebyte
LQ Newbie
 
Registered: Mar 2006
Location: norway
Distribution: debian
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mega Man X
Hi!

You may have to create a manifest file in order to make your jar file an executable. Take a look in here:

http://csdl.ics.hawaii.edu/~johnson/...jar-files.html

Some IDE's has the ability to create an executable jar file for you, such as Eclipse and BlueJ

Regards!
Thanks for answering, i will check out that link, but should probably tell you that netbeans IDE created this jar file for me.

Edit: I found the solution now to my problem. The problem was that even when i have jre and jdk installed on my system i didnt have them in my path variable, so after exporting them i got it working.

Last edited by icebyte; 04-30-2006 at 11:17 AM.
 
  


Reply

Tags
jar, java



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
jar files Knowledgements Slackware 12 07-22-2005 03:36 AM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 05:26 AM
What do i do with .jar files joeman3429 Fedora 11 07-26-2004 11:00 AM
How to install .jar files? Impaler Linux - Software 1 05-05-2004 07:52 AM
jar files mlynch147 Programming 2 10-24-2001 07:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration