image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old May 23rd, 2008, 07:58 AM
Registered User
 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rubisco is on a distinguished road
Help on .jar file

Hi guys,
I need help on Java.
I have a Macbook (10.4). When I try to open a .jar file, I got a message like: can't open...
In the Console, the error message is:

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

I googled it and it seem that something is missing from my OS, since the .jar file has been "compiled" with something that I don't have (??). Software update is ok, and on the terminal (don't ask me how I arrived there):
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing)

Can someone help me? Thanks a lot in advance
Reply With Quote
  #2  
Old May 23rd, 2008, 10:20 AM
VirtualTracy's Avatar
AppleDouble-Aware?
 
Join Date: Aug 2006
Location: Australia
Posts: 1,074
Thanks: 22
Thanked 50 Times in 50 Posts
VirtualTracy is on a distinguished road
Help me! I can't run a .jar file!

Have a look at the link in post # 2 to see if there is any help for you there ...
Reply With Quote
  #3  
Old May 23rd, 2008, 10:29 AM
Registered User
 
Join Date: Jun 2002
Location: USA
Posts: 2,565
Thanks: 2
Thanked 10 Times in 10 Posts
MisterMe will become famous soon enough
Quote:
Originally Posted by rubisco View Post
I googled it and it seem that something is missing from my OS, since the .jar file has been "compiled" with something that I don't have (??). ...
Unless you have removed something, then there should be nothing missing. You should have an application named Java Web Start in /Applications/Utilities/Java/.

Quote:
Originally Posted by rubisco View Post
...
I need help on Java.
I have a Macbook (10.4). When I try to open a .jar file, I got a message like: can't open...
A .jar file is nothing that you need to open. It is a program known as a Java archive. Double-clicking on a .jar file launches Java Web Start that executes the program.
Reply With Quote
  #4  
Old May 23rd, 2008, 03:49 PM
mvcube's Avatar
Mac newbie
 
Join Date: Mar 2008
Location: Wehrheim, Germany
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
mvcube is on a distinguished road
MisterMe, a jar file is directly executed by the Java runtime envirnment which is not "Java Web Start". The latter is a special application to help download the most recent versions of installed Java programs and is not needed to execute a standard jar.

Java version numbers have gon past version 1.5 (aka Java5). The most recent version is 1.6 (Java6) which is not compatible because features were added which the Mac version of Java lacks. The Java environment does a check whether the jar file was compiled with veriosn 1.5 or below. Otherwise, it is rejected. Get a 1.5 version of the app or wait until Java on OSX goes to version 1.6.
__________________
Marcus,
Wehrheim Germany

http://www.mvcsys.de
Reply With Quote
  #5  
Old June 3rd, 2008, 01:12 PM
Registered User
 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rubisco is on a distinguished road
Thanks guys, I think the problem is 1.6 vs 1.5. I'll wait... I think.
Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 10:35 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.