Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 netbeans IDE 构建了一个可执行的 jar 文件,它在我的系统中运行良好,但昨天我把它交给了我的朋友,他抱怨文件没有运行,它只是显示启动屏幕然后关闭,他有 JRE 6安装。
我无法解决问题。有人可以帮忙吗?
问题是,您使用 JDK7 构建 jar 并希望在 JDK6 上运行它。它会变成错误。尝试使用JDK6降级并再次构建jar。
右键单击您的项目属性并选择Libraries并更改 Java 平台。
Libraries
如果JDK6没有出来,请确保从Tools > Java Platforms和Add Platform...
Tools > Java Platforms
Add Platform...