aspose file tools*
The moose likes Java in General and the fly likes EXE in Java? 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 "EXE in Java?" Watch "EXE in Java?" New topic
Author

EXE in Java?

Death Arte
Greenhorn

Joined: Feb 17, 2011
Posts: 21

Good day!

I'm going to create a java application, but first how it will be an executable?
I mean one click program then execute..
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18108
    
  39


By EXE, I am assuming that you are using windows... Windows support "one-click" execution of executable jar files. Just package your classes into a jar file, create a manifest to make it executable, and windows will run it with "one click".

If you really need it to be an EXE file, then you can compile it to an EXE. Just google for "AOT java compiler" for some compilers.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3370
    
    9
Personally I really enjoy Install4J and Exe4J. They are not free, but they are amazing tools.
Death Arte
Greenhorn

Joined: Feb 17, 2011
Posts: 21

Henry Wong wrote:
By EXE, I am assuming that you are using windows... Windows support "one-click" execution of executable jar files. Just package your classes into a jar file, create a manifest to make it executable, and windows will run it with "one click".

If you really need it to be an EXE file, then you can compile it to an EXE. Just google for "AOT java compiler" for some compilers.

Henry


id like to build an application that would run in different platforms without changing the code. so i think Jar file is one of the best options.
correct me if im wrong, Jar file can't be executed if there's no JRE installed in terminal?
Death Arte
Greenhorn

Joined: Feb 17, 2011
Posts: 21

Stephan van Hulst wrote:Personally I really enjoy Install4J and Exe4J. They are not free, but they are amazing tools.


Thanks for the advice, but for now, i do really hate using not free softwares..
for the reaso of Financial probs.. Hehe!
Death Arte
Greenhorn

Joined: Feb 17, 2011
Posts: 21

Hey guys! i found this by googling.. Hehe!

http://www.excelsior-usa.com/articles/java-to-exe.html
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
You are better off using an executable .jar.

This is too difficult a question for "beginning", so I shall move it.
Death Arte
Greenhorn

Joined: Feb 17, 2011
Posts: 21

@Campbell Ritchie

Sorry Sir..

Anyway, nice link...

Thank you..
 
Don't get me started about those stupid light bulbs.
 
subject: EXE in Java?
 
Similar Threads
c++ or Java--your suggestions please
class
J2EE
WA #2 ..... word association
zipping as self extracting exe