• 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
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

.class file into .exe file

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I tried to rename .bat file to .exe... And it does give an error
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic