没必要弄成exe吧,jar也可以执行呀

解决方案 »

  1.   

    故乡里的贴子http://www.epubcn.org/read.php?tid=46512&fpage=1
    1、在exe里面调用 shell 那样 javaw
    2、也可以用JNI创建进程内的JVM,然后调用java class
    http://java.sun.com/j2se/1.3/docs/guide/jni/jni-12.html#JNI_CreateJavaVM一个open source java->exe wrapper工具
    http://jsmooth.sourceforge.net/index.phpJSmooth is a Java Executable Wrapper that makes a standard Windows executable binary (.exe) from a jar file. It makes java deployment much smoother and user-friendly, as it is able to find a Java VM by itself. When no VM is available, it provides feed-back to the users, and can launch the default web browser to an URL that explains how to download a Java VM.3.再推荐一个open source工具:Java Service Wrapper
    http://wrapper.tanukisoftware.org/doc/english/index.htmlThe Java Service Wrapper is an application which has evolved out of a desire to solve a number of problems common to many Java applications: Run as a Windows Service or Unix Daemon 
    Application Reliability 
    Standard, Out of the Box Scripting 
    On Demand Restarts 
    Flexible Configuration 
    Ease Application Installations 
    Logging4.还有一个真正把java转为native code的开源程序,GCC/GCJ,我的很多程序就是用这个工具处理的。5.http://frenzelsoft.de/ 
    the eclipse gluginAppStaGe (Application Starter Generator) is a Windows Executable Generator Tool that allows you to create a Windows executable that starts your Java application. A Windows executable prevents the console window from appearing like it happens with using e.g. a batch file to run the application. Furthermore the Windows executable gives the user the look & feel of a standard C++ Windows application (including an application icon in the exe file).
      

  2.   

    我的问题是:把jar放到exe里,运行exe,能把jar考到programm file里,然后在桌面建一个jar的快捷方式,双击就可以运行这个java程序了。
      

  3.   

    大家都用jbuilder还是 installanywhere呢?
      

  4.   

    jbuilder主提示一个main类 打包你之后 什么版本下的'exe'逗有 linux下的逗有(呵呵开个玩笑)
      

  5.   

    写成一个批处理文件,双击这个文件,就执行一个java命令就行了啊
      

  6.   

    jb中打包成exe的情况http://www.epubcn.org/read.php?tid=46512&fpage=1不是说得很清楚吗
      

  7.   

    http://www.epubcn.org/read.php?tid=46512&fpage=1不能访问。
      

  8.   

    生成EXE就不能跨平台了我还是觉的用批处理文件的方法好!
      

  9.   

    要不是执行效率低,谁还会挖空心思想这些JVM 台阶太高!
      

  10.   

    我现在不想跨平台,就想在windows下用。iforem(安歌)给的东西很好,可是看来很麻烦大家都用jbuilder还是 installanywhere呢?
      

  11.   

    jBuilder 就可以。在工具向导下面就可以生成,什么版本的都有,windows,linux,有窗口,无窗口的。等等。。
      

  12.   

    一般是Jar文件就够了,如果是比较大的程序,可以用安装工具。Zero-g不错。
      

  13.   

    JB的exe是假的,脱离了JVM没有任何意义。
    installanywhere之类的工具可以打包jre,是你想要的exe.
    不过我觉得iforem(安歌)给的“转为native code”不错,不过我没试过,有空要试试。
      

  14.   

    我明白楼主的意思,我自己做过,你可以这样,
    用JB9,做成EXE形式,
    然后只须用WINRAR,是的WINRAR解压缩软件,里面的高级用法(制作安装程序)就可以了
    至于如何使用WINRAR,你可以在网上找一下它的教程。