JAR文件在Mac上未打开 [英] JAR file not opening on a Mac

查看:3878
本文介绍了JAR文件在Mac上未打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图在我的Mac上打开一个JAR文件没有成功。它说,JAR文件无法打开,并要求我在我的控制台中查找任何错误消息。这里是控制台消息。我怀疑这个问题是在第一行本身,但我不是从软件背景,所以不知道这是否足够的任何人谁知道Java,告诉什么问题。我更新了我的软件,所以我假设我有最新版本的Java,虽然我不知道如何100%确保 - Java.com网站只是告诉我更新我的Mac上的整体软件,并说,也照顾Java的最新版本。请帮助!

I have been trying to open a JAR file on my Mac with no success. It says the JAR file could not be opened and asks me to look for any error messages in my console. Here are the console messages. I suspect the prob is in the first line itself, but I am not from a software background, so don't know if this is enough for anyone who knows Java to tell what the issue is. I did update my software, so I am assuming I have the latest version of Java although I don't know how to 100% ensure that - the Java.com website just told me to update the overall software on my Mac and said that will take care of Java's latest version also. Please help!

5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079] Exception in thread "main"  
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079] java.lang.UnsupportedClassVersionError: Bad version number in .class file 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.lang.ClassLoader.defineClass1(Native Method) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.lang.ClassLoader.defineClass(ClassLoader.java:675) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.net.URLClassLoader.access$100(URLClassLoader.java:56) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.net.URLClassLoader$1.run(URLClassLoader.java:195) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.security.AccessController.doPrivileged(Native Method) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.net.URLClassLoader.findClass(URLClassLoader.java:188) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.lang.ClassLoader.loadClass(ClassLoader.java:316) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.lang.ClassLoader.loadClass(ClassLoader.java:251) 
5/26/09 7:48:01 AM [0x0-0x72072].com.apple.JarLauncher[1079]  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)


推荐答案

当JVM遇到不支持的类版本时,抛出上述异常。当JVM遇到为以后 JVM创建的类时,会发生这种情况。所以你需要升级你的VM,然后更改你的默认Java。

The above exception is thrown when a JVM encounters an unsupported class version. This occurs when the JVM encounters a class built for a later JVM. So you need to upgrade your VM, then change your default Java.

更改默认值的方法如下:

Here's how to change your default:

在Spotlight中输入java偏好设置。您将看到Java首选项实用程序。运行它,你可以更改默认的Java实例到你需要的(可能是Java 6)。

Type 'java preferences' into Spotlight. You'll see the 'Java Preferences' utility. Run that, and you can change the default Java instance to what you require (probably Java 6).

编辑:该实用程序在Application / Utilities / Java。使用Spotlight似乎是一种更容易找到的方式!

That utility is in Application/Utilities/Java. Using Spotlight seems an easier way to find it though!

这篇关于JAR文件在Mac上未打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆