• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert java file to .exe file.

 
Prabhat Gupta
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Prabhat Gupta
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ulf!!!

Fantastic stuff!!!
 
Parham Emami
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inno set is windows installer
prepares a exe file for java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic