# Help on .jar file



## rubisco (May 23, 2008)

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


----------



## VirtualTracy (May 23, 2008)

_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 ...


----------



## MisterMe (May 23, 2008)

rubisco said:


> 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/_.



rubisco said:


> ...
> 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.


----------



## mvcube (May 23, 2008)

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.


----------



## rubisco (Jun 3, 2008)

Thanks guys, I think the problem is 1.6 vs 1.5. I'll wait... I think.


----------

