打开我生成的exe文件的时候,报错。
No JVM could be found on your system.
Please define EXE4J_JAVA_HOME
to point to an installed 32-bit JDK or jre or download a JRE from www.java.com
确定是否已经安装了jre,没有安装可以去 http://www.skycn.com/soft/27213.html 下载安装
如果还是不可以,你需要手动设置一下JAVA_HOME环境变量,具体步骤如下:
1.我的电脑 右击 >> 选 属性 >> 高级 >>点 环境变量 按钮
2.在系统变量下面点击 新建 按钮,
变量名: JAVA_HOME
变量值: C:\Program Files\Java\jre6
变量值的具体值是你jre的安装路径,默认安装的一般就是C:\Program Files\Java\jre6我已经更改了变量,可是还是显示这样的错误。我已经安装过JRE.
那位高手能不能帮我看看了。

解决方案 »

  1.   

    出错信息让你设EXE4J_JAVA_HOME,你设JAVA_HOME干什么?
      

  2.   

    是哦,那你能告诉我怎么更改EXE4J_JAVA_HOME吗?
      

  3.   

    path classpath呢 你光设个变量有什么用
      

  4.   

    exe4j的时候你没选jre环境吧。从新做个。
      

  5.   

    参考下
    http://blog.csdn.net/fog911811/article/details/6151700
      

  6.   

    还有一个问题为什么我在eclipse里生成的_fat.jar文件,不能直接运行。是不是和这个有关系。
    可是我写的程序直接run在eclipse上运行是没有问题的。郁闷哦。
      

  7.   

    导出的时候,有个设定jar的main class呢,你选上就可以了。
      

  8.   

    我晕,JAVA_HOME会设,EXE4J_JAVA_HOME就不会设了?
      

  9.   

    我现在生成的exe文件执行后报错:
    java.lang.ClassNotFoundException: interf1
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.exe4j.runtime.WinLauncher.main(Unknown Source)
    是什么原因哦
      

  10.   

    是我生成_fat.jar文件的时候,classpath制定错误吗
      

  11.   

    keep your jar is correct first
      

  12.   

    i used this _fat.jar to generate the jar file, and choosen the classpath.
    everything is same as before,but i don't know where is the problem on this issue.
      

  13.   

    you will find more info when you export jar by next and next but not finish.
      

  14.   

    yeah, i am trying to export it again and again, and keep on modifying my script and now my script can update the interface in time.
    now that's ok.
    but i still can't deal with this issue,when .exe file running, the screen will display : java.lang.ClassNotFoundException: interf1