打开 IReport 收到错误消息 - “找不到 java exe。”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33359520/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 21:33:16  来源:igfitidea点击:

opening IReport getting error message - "Cannot find java exe."

javaireportportable-applications

提问by

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

我的报告在我的计算机上运行良好,但是在另一台计算机上用 Java 打开 IReport 文件时,

I keep getting error message -

我不断收到错误消息 -

"Cannot find java exe."

"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?

我正在使用 IReport 便携式。可能是什么问题呢?

采纳答案by Myk Agustin

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

这是因为 jdkhome 尚未设置或 jdkhome 无法在系统中找到您的 jdk 文件。你所要做的就是:

-setup jdkhome in ireport's ireport.conf file

-在 ireport 的 ireport.conf 文件中设置 jdkhome

jdkhome="/path/to/jdk"
jdkhome="c:Program Files/Java/jre7"-file to jdk

回答by Ijaazops

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

首先,iReports 5.6.0 可以在 jdk 1.7.xx 上运行它不能在 jdk 1.8.xx 上运行,因此首先你必须安装 jdk 1.7.xx

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.

然后转到安装 jasperreport 的文件夹。例如:C:\Program Files (x86)\Jaspersoft\iReport-5.6.0\etc 然后编辑“ireport.conf”文件。

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"

jdkhome="/path/to/jdk" 到 jdkhome="C:\Program Files\Java\jdk xx"

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

指出您安装的JDK的版本,并确保删除“#”符号,否则将无法运行

回答by Ijaazops

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

您必须找到 IReport 的 ireport.conf 文件并进行编辑

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

打开它然后更改行 jdkhome="/path/to/jdk"

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

(即jdkhome="c:Program Files/Java/jre7"- 您的 jdk / jre(版本)文件所在的位置)

回答by John C. Kirk

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.

我在非便携式版本上遇到了类似的问题。在我的例子中,机器有一个 64 位版本的 Java 和一个 32 位版本的 iReport,这导致了你遇到的神秘错误消息。在该机器上安装 32 位版本的 Java 解决了该问题。

回答by trí nguy?n

If you use Ubuntu:

如果您使用 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"
    
  1. 安装 JDK 7:?sudo apt-get install openjdk-7-jdk

  2. 文件 ireport.config 中的配置路径 jdk(在 forder 中:“您下载的包”/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"

!注意:不是??--jdkhome="/usr/lib/jvm/java-7-openjdk-amd64"

回答by Viresh Saini

  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.
  1. 检查已安装系统中 C:\Program Files\Java\jre7 的 jre 路径。
  2. 打开 C:\Program Files (x86)\Jaspersoft\iReport-5.6.0\etc\ireport.conf 文件。
  3. 根据安装的系统设置 jdk 路径为 jdkhome="C:\Program Files\Java\jre7" 并保存 ireport.conf 文件。
  4. 双击或从程序菜单启动 iReport-5.6.0 Jasper 报告成功打开。