Question:
can i run my java program as *.exe file(without the help of JAVA command)?
Arwind S
2007-05-04 12:39:39 UTC
how to create the self executable program in java language.?
i want to create the program in JAVA which has to be executed without the help of "JAVA" command. it shuold run as *.exe file. is it possible for that, is yes means pls tell me how??
Three answers:
Chinni
2007-05-04 12:48:05 UTC
Do a Yahoo search for Java native compiler.

http://schmidt.devlib.org/java/native-compilers.html#products
2016-04-01 12:34:28 UTC
Yup, the one before is right: assume ur source code is in folder c:\x and it's names foo.java then : 1. Go to the directory where ur java source is by typing : cd c:\x 2. [press enter] 3. Compile ur code by typing : javac foo.java 4.[Press Enter key ] This should create a file called foo.class ( which is like an executable file for Windows ). This file MUST be in the same folder like foo.java ( should be in folder c:\x ) 5. Now run the .class file by typing java foo DO NOT type .class !!! 6.[press enter] You must see the output (unless another problem is there !)
EdrickV
2007-05-04 12:53:58 UTC
This page has a lot of information on the methods and limitations of compiling a java program to an exe. (And other ways to do what I think you really want: Running the program via double click.)

http://www.yoda.arachsys.com/java/javaexe.html

It also has a link to the page in the previous response.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...