aspose file tools*
The moose likes Java in General and the fly likes How to convert java file to .exe file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to convert java file to .exe file." Watch "How to convert java file to .exe file." New topic
Author

How to convert java file to .exe file.

Prabhat Gupta
Ranch Hand

Joined: Jan 22, 2008
Posts: 135
Hi Ranchers,
May be i am crazy to ask such question.

Suppose i have a java file say file1.java . If i have to run it at first i will compile it,then run the class file with java command.
Sometimes i dream that it will be nice to convert that .java file into some .exe file and when user clicks on that it should start running (of course it should compile it in background do you not feel to compile and run the java file is very monotonous work.

So can you come up with some ideas to realize my dream?
i m going to sleep now
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Your dream can easily come true. That's what jar files are for. The code won't be native, though, so you still need a JRE installed. But the application will be double-clickable.


Ping & DNS - updated with new look and Ping home screen widget
Prabhat Gupta
Ranch Hand

Joined: Jan 22, 2008
Posts: 135
Thanks ulf!!!

Fantastic stuff!!!
Parham Emami
Greenhorn

Joined: Jul 11, 2003
Posts: 15
hello there,

you could also create an OS related script (.sh or .exe) containing the -java command to run your CLASS file. be aware that from OS perspective, this script should be eligible to recognize your JDK and your class file.

Cheers
Parham
sunny chellan
Greenhorn

Joined: Apr 24, 2008
Posts: 2
Inno set is windows installer
prepares a exe file for java
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert java file to .exe file.
 
Similar Threads
what is urs
how to create .exe in java
C++
Running a .exe file from a .java file
Java Portability ?