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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark ".class file into .exe file" Watch ".class file into .exe file" New topic
Author

.class file into .exe file

sakthivel shan
Greenhorn

Joined: Nov 11, 2002
Posts: 7
Dear All,
I have a java program....and the compiled ".class" file for this....basically, it is a Frame..i will run this said program from my command prompt like,
C:\java megalaunch
...the frame will appear now....
what i want to know is .............Is it possible to change this said class file, in to an .exe file...so that, (instead of going for a command prompt for running the said program) i can just double click the said .exe file and start that said Frame....
pl. post a reply,
Sakthivel S.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Making an .exe file is the least best choice you could make.
You can .jar your app and then have the user (or icon) click the .jar file and it will invoke java.
Since this is apparently a Windows app (this exe you were talking about would be platform specific) you can just create a .bat file. that gives you the opportunity to change directories, modify the path if needed, invoke the java application naming your preferred classpath on the way and referencing any input parameters that you might want.
There are lots of examples of this scatterred through the Beginner and Intermediate forums.
You of course will want to find the example in the Intermediate Forum if possible .
Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
OK, I tried to rename .bat file to .exe... And it does give an error
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Guennadii,
You would have to COMPILE something into an .exe file. You would need a tool capable of compiling the initial language into a binary file for the target platform.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
And at any rate it would NEVER be the .bat file stuff that would go into an .exe.
What exactly are YOU trying to accomplish?
Stewart Griffin
Greenhorn

Joined: Dec 02, 2002
Posts: 23
Check out.....
www.excelsior-usa.com/jet.html
This software will turn your java programs
into .exe's
Downside is it takes about 30 mins to install!
I've had a couple of problems with this,
but a few of my friends swear by it.
Upside is that your programs will run much
faster.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: .class file into .exe file