在新的jre,jdk更新后,无法在Netbeans中制作jar

时间:2015-04-25 05:45:53

标签: java netbeans compatibility

我'我真的很生气去年夏天我开始用java创建一个游戏,一个月后我有超过5000行的工作代码。完美工作,0错误或故障。在每个操作系统上测试jar文件。使用JDK 7。

我推迟了这份工作,三个月后我把我的游戏带给了我的朋友给他看,但它已不再适用了。

在新的Netbeans 8中运行完全正常工作,但不能再制作Jar了,因为很长的错误列表。

我发现这是荒谬的。每次jre更新后你需要重写代码吗?然后我再也不会做任何java程序,回到C. Eclipse更好吗?

我不想分享我的代码。

如何在不重写代码的情况下使用jar文件再次运行我的程序?我试图安装较旧的JRE'但这对情况没有帮助。

谢谢!抱歉我的英文。

添加了零件程序错误:

Exception in thread "AWT-EventQueue-0"
java.lang.ArrayIndexOutOfBoundsException:  1
        at kj01.kezdolap.jButton6ActionPerformed(kezdolap.java:1006)
        at kj01.kezdolap.access$2100(kezdolap.java:32)
        at kj01.kezdolap$19.actionPerformed(kezdolap.java:801)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$400(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

1 个答案:

答案 0 :(得分:2)

好的,我找到了答案。

Netbeans跳出Arrayoutofbounds类型错误,但jre编译器没有。不知何故,较旧的jre编译器跳出了Arrayoutofbounds错误。因此Netbeans可以使用Arrayoutofbounds错误运行应用程序。

我将我的应用程序移植到Eclipse,立即警告我:

.splits() caused the problems.

编辑: 我在源目录中分割文件位置,在源代码外部找不到文件位置。