java 无法使用 Netbeans 8 和 JDK 1.8 运行 iReports 5.6.0
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25973224/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot run iReports 5.6.0 with Netbeans 8 and JDK 1.8
提问by FireDrakon
I have installed Netbeans 8 with JDK version 1.8. I recently downloaded iReports 5.6.0 for the creating reports. After installation the program doesn't open. There is an error saying
我已经安装了 JDK 1.8 版的 Netbeans 8。我最近下载了 iReports 5.6.0 来创建报告。安装后程序打不开。有一个错误说
Cannot find Java.exe Neither (null)\jre\bin\java.exe nor (null)bin\java.exe exists.
找不到 Java.exe (null)\jre\bin\java.exe 和 (null)bin\java.exe 都不存在。
How can I solve this?? I have created my project using Netbeans8 and if I downgrade my netbeans to version 7 or something won't my GUI interfaces get messed up?
我该如何解决这个问题??我已经使用 Netbeans8 创建了我的项目,如果我将我的 netbeans 降级到版本 7,或者我的 GUI 界面不会变得一团糟?
回答by mkazma
You'll have to modify the ireport.conf file to specify the JDK you want iReport to use.
您必须修改 ireport.conf 文件以指定您希望 iReport 使用的 JDK。
Going through the install Windows 7 x64 will specify the default path to the x86 program files. I.E. "Program Files (x86)" Change this to "Program Files" then make the changes in the config file.
通过安装 Windows 7 x64 将指定 x86 程序文件的默认路径。IE "Program Files (x86)" 将其更改为 "Program Files" 然后在配置文件中进行更改。
You'll find the ireportpro.conf file under [ireport_install_directory]\etc\ireportpro.conf. If you installed iReport with the installer, there's an ireport folder in the folder where you installed JasperReports Server.
您将在 [ireport_install_directory]\etc\ireportpro.conf 下找到 ireportpro.conf 文件。如果您使用安装程序安装了 iReport,则在您安装 JasperReports Server 的文件夹中会有一个 ireport 文件夹。
There are two lines in that file that I would change:
该文件中有两行我要更改:
Uncomment out the jdk home setting, and point it explicity to where you've installed th 64-bit JDK 1.7. Change it from:
取消对 jdk home 设置的注释,并将其明确指向您安装 64 位 JDK 1.7 的位置。将其更改为:
jdkhome="/path/to/jdk"
jdkhome="/path/to/jdk"
To something like what you see below:
类似于您在下面看到的内容:
jdkhome="C:\Program Files\Java\jdk1.7.0"
jdkhome="C:\Program Files\Java\jdk1.7.0"
I would also change the "default_options" line from:
我还将更改“default_options”行:
default_options="-J-Xms24m -J-Xmx512m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=256m"
default_options="-J-Xms24m -J-Xmx512m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=256m"
to something that gives the JVM running iReport more memory and a lower MaxPermSize value. An
给运行 iReport 的 JVM 更多内存和更低 MaxPermSize 值的东西。一个
default_options="-J-Xms1024m -J-Xmx1024m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=128m"
default_options="-J-Xms1024m -J-Xmx1024m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=128m"
Enjoy!
享受!