简体   繁体   English

安装jre 7后,netbeans项目无法运行

[英]netbeans project doesn't run when jre 7 installed

I have a rather large NetBeans 7.0.1 project, which is released as an installer. 我有一个很大的NetBeans 7.0.1项目,它是作为安装程序发布的。 When a second PC has this program installed, and has Java 6 installed, it runs fine, however if this PC happens to have Java 7 installed, some parts of the program fail. 当第二台PC安装了该程序并安装了Java 6时,它可以正常运行,但是,如果该PC恰好安装了Java 7,则该程序的某些部分将失败。

Why is this and how can I solve this? 为什么会这样,我该如何解决呢?

One part where it fails: there is a bean class that, when right-clicked in the GUI, shows a pop-up menu with 'Properties'. 失败的一部分:有一个bean类,当在GUI中右键单击时,将显示一个带有“属性”的弹出菜单。 When clicked, it opens a property sheet, however, fields which are not primitive types show "(No Property Editor)". 单击时,它将打开一个属性表,但是,不是基本类型的字段显示为“(无属性编辑器)”。 I can't trace this back because most of the logic happens within native NetBeans API code and a lot of Reflection is used. 我无法追溯到此,因为大多数逻辑都发生在本机NetBeans API代码内,并且使用了大量反射。

Edit: I also installed NetBeans 7.4 with Java 7 on the development machine, changed all modules to 1.7 source, recompiled, but the problem persists. 编辑:我还在开发机器上安装了Java 7的NetBeans 7.4,将所有模块更改为1.7源,重新编译,但问题仍然存在。

There are a lot of differences between Java 6 and 7 so pointing to the specific problem is difficult. Java 6和7之间有很多区别,因此很难指出具体问题。 Probably the API's you are using are based on Java 6. You have two options make your project Java 7 compatible or install Java 6 on the machines that use your project/application. 您正在使用的API可能基于Java6。您有两个选择可以使您的项目与Java 7兼容,也可以在使用项目/应用程序的计算机上安装Java 6。 The latter would be the easiest in my opinion. 在我看来,后者将是最简单的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM