开发者

how i can create executable file in java [duplicate]

开发者 https://www.devze.com 2023-02-18 15:20 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: how can I create executable file for the program written on Java?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

how can I create executable file for the program written on Java?

hi, how i can create executable file in java. i want to set java home by creating my executable file. so please give some e开发者_StackOverflow中文版xample how i can set java home by executable file


Try following options:

JSmooth

http://sourceforge.net/projects/launch4j/

Ans Check this thread for more options


hi, how i can create executable file in java.

This has been asked and answered many times before on SO;
e.g. How can I convert my Java program to an .exe file?.

i want to set java home by creating my executable file.

That simply makes no sense. You cannot set an environment variable (e.g. $JAVA_HOME) or Java property (java.home) by creating an executable file.

so please give some example how i can set java home by executable file

That makes slightly more sense, but the question is where do you want to set it. If you want to set $JAVA_HOME / %JAVA_HOME% for a shell, you have to do this by executing a shell builtin-command, or by launching a new shell. You could set the Java java.homeproperty in a currently executing Java program, but there is no point ... it will most likely just break things.


Based on your past questions, I'm going to make a wild guess and that you are trying to set the $JAVA_HOME / %JAVA_HOME% for a Tomcat instance. If that is the case, then:

  • for UNIX you should set it in the wrapper script that launches Tomcat,
  • for Windows you can set it as a command option in the Tomcat service launcher;
    see http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html.
0

精彩评论

暂无评论...
验证码 换一张
取 消