9

My report works fine in my computer but When Opening an IReport File in Java on another computer,

I keep getting error message -

"Cannot find java exe."

or

"Neither (null)\\jre\\bin\\java.exe nor (null)\\vin\\java.exe exists"

I am Using IReport portable. What could be the problem?

6 Answers6

11

This is because jdkhome is not setup yet or jdkhome cannot locate your jdk file in the system. all you have to do is:

-setup jdkhome in ireport's ireport.conf file

jdkhome="/path/to/jdk"
jdkhome="c:Program Files/Java/jre7"-file to jdk
Kym NT
  • 670
  • 9
  • 28
7

First of all iReports 5.6.0 will work on jdk 1.7.x.x it will not work on jdk 1.8.x.x therefore first you will have to install jdk 1.7.x.x

Then goto the folder where the jasperreport is installed. eg:C:\Program Files (x86)\Jaspersoft\iReport-5.6.0\etc then edit the "ireport.conf" file.

edit the file with notepad and change the following line to this.

jdkhome="/path/to/jdk" to jdkhome="C:\Program Files\Java\jdk x.x"

Indicate the version of your installed JDK and also make sure to remove the "#" symbol or it will not work

Community
  • 1
  • 1
Ijaazops
  • 93
  • 1
  • 9
  • "make sure to remove the "#" symbol or it will not work" this made the difference for me! Thanks – dentist Dec 22 '22 at 10:07
2

You will have to locate your IReport's ireport.conf file and edit it

Open it then change the line jdkhome="/path/to/jdk"

(i.e. jdkhome="c:Program Files/Java/jre7" - where your jdk / jre (version) file is located)

Kym NT
  • 670
  • 9
  • 28
0

I had a similar problem with the non-portable version. In my case, the machine had a 64-bit version of Java and a 32-bit version of iReport, which led to the cryptic error message you encountered. Installing the 32-bit version of Java on that machine solved the problem.

0

If you use Ubuntu:

  1. Install JDK 7: sudo apt-get install openjdk-7-jdk

  2. Config path jdk in file ireport.config (in forder: "package that you downloaded"/etc/):

    default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
    
    jdkhome="/usr/lib/jvm/java-7-openjdk-amd64"
    

!Note: NOT  --jdkhome="/usr/lib/jvm/java-7-openjdk-amd64"

A. Suliman
  • 12,923
  • 5
  • 24
  • 37
0
  1. Check the jre path at C:\Program Files\Java\jre7 in installed system.
  2. Open C:\Program Files (x86)\Jaspersoft\iReport-5.6.0\etc\ireport.conf file.
  3. Set jdk path as jdkhome="C:\Program Files\Java\jre7" as per installed system and save the ireport.conf file.
  4. Double click or launch iReport-5.6.0 from program menu Jasper report opens successfully.
Viresh Saini
  • 154
  • 1
  • 2