Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

How to convert java file to .exe file.

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ulf!!!

Fantastic stuff!!!
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Inno set is windows installer
prepares a exe file for java
reply
    Bookmark Topic Watch Topic
  • New Topic