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

Convert .class to .exe

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!
I need to convert an application(.class) into an executable file(.exe). My main problem is that the application uses Swing components, and it has to be able to run on Win 98 and upwards. So my question is how I can make sure that the application will be executable on these platforms even though it uses Swing? Will there be any problems? Will I have to convert the application so it uses AWT components instead?
Thanks!
Dominic
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would you need to convert Java class files to and .exe file? Why don't you just incluce the JVM when you distribute your app, and keep it a Java app, that way it can be used on any platform, if you decide later you need to be able to run it on other kinds of compuers.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JtoEXE is available at this site:
http://javaarchives.javaarchives.com/development_-_java.html
 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
J2EXE isn't a compiler, though, is it - it's like a launcher - it provides an executable to launch your app, but the class files are still in there in their original form.
Not that that really matters, I suppose.
GNU are working on a Java compiler that is freely available, I'm not sure what stage it's at yet.
I hear some commercial packages let you compile java to native executable, but i haven't looked into that.
 
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
If you bundle the JRE in with your application it will include the swing stuff.
This explains how to use it http://java.sun.com/products/jdk/1.1.7B/jre/example/index.html
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i need to do the opposite make a application into a java applet who can help?(.class)
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this one:
http://www.geocities.com/j2exe/
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1st of all if you want to create an executable format on a .java program what you need to do is to create a " .jar file " an executable form of java. Here's a guide where you can learn how to create a executable file or jar file.

http://java.sun.com/docs/books/tutorial/jar/basics/build.html
If you still dont know how too then :

Try this for your program create 1st a manifest.tmp file in the notpad of your windows try typing this on you tmp file:
" main-class : yourmain.class "
After you figure out what java program you want to create a .exe for
then type this to the command promt :
c:\jdk1.3.1\javac\bin\jar Filename.jar manifest.tmp *.class
then press enter.
thats it you've just created a jar file.
Filename.jar here is the main java program that you put in the manifest file and also the one that you want to create an .exe for.
After finishing the .exe or the .jar file you can create an installer now, you need 1st to download the InstallAnywhere from http://www.zerog.com
Hope that helps . . .
Life is like a book that you need to review for continues knowledge and growth.
http://javatm.4t.com
My Personal Site
[ September 19, 2003: Message edited by: Jan Michael Soan ]
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic