Cannot run iReports 5.6.0 with Netbeans 8 and JDK 1.8

FireDrakon picture FireDrakon · Sep 22, 2014 · Viewed 16.9k times · Source

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

Cannot find Java.exe Neither (null)\jre\bin\java.exe nor (null)bin\java.exe exists.

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?

Answer

mkazma picture mkazma · Sep 22, 2014

You'll have to modify the ireport.conf file to specify the JDK you want iReport to use.

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.

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.

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:

jdkhome="/path/to/jdk"

To something like what you see below:

jdkhome="C:\Program Files\Java\jdk1.7.0"

I would also change the "default_options" line from:

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

default_options="-J-Xms1024m -J-Xmx1024m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=128m"

Enjoy!