-2

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 example how i can set java home by executable file

2
  • before asking an SO question, you should always do a search to see if someone has asked it already. Commented Mar 19, 2011 at 8:19
  • The question is unclear. If you compile a class with a main mehtod, it is executable. If your system isn't configured the right way, you have to fix that. You're talking about JAVA_HOME? Be precise! You want to create a batch- or script-file to start your program with a specific JAVA_HOME? Well, first, choose an operating system. Commented Mar 19, 2011 at 8:44

2 Answers 2

2

Try following options:

JSmooth

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

Ans Check this thread for more options

Sign up to request clarification or add additional context in comments.

Comments

0

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:

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.