This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes convert class files to executable files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "convert class files to executable files" Watch "convert class files to executable files" New topic
Author

convert class files to executable files

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
We have made a InstantMessenger in Java using RMI & Core Java(Frames) . This code is working in Local network successsfully. But we want to make an executable file of this code, which user can download from the internet and can install the same on his machine.
Can someone help us to make java class files to executable files.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Dipesh -
I'm going to move this over to Advanced, since the RMI/CORBA part doesn't relate to the solution you want.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

This is a common question here at the Java Ranch. If you do a search for this question, you will find a lot of posts from the past.
Here are some things I learned though.
There are 3rd party apps that will convert your CLASS files into an EXE, but they are really expensive.
The best thing to do is JAR up your file, use a program like INSTALL SHIELD and create a batch that runs the JAR file and then INSTALL SHIELD will package that into an EXE installer that will place your JAR file and your BAT file in the appropriate locations. Your Batch file should create the class path.

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
As Gregg mentioned, there are several commercial tools which do that but they are expensive. You may want to try Java2exe. You have to pay for it, all functionalities are there but there is some kind of popup frame that appear as long as you don't register... I tried it and it works fine.
The solution given by Gregg is fine too, and IMO more elegant!
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: convert class files to executable files