9

What's a good program to turn a .jar into .exe? I've tried jSmooth, JEXECreator and launchJ to no avail.

4
  • 1) Can you launch the app. as a Jar by double clicking it? 2) Why code in the cross-platform Java then make a Windows native? 3) A good installer for Java rich-client apps. is Java Web Start. JWS works on platforms that support Java. Commented May 14, 2011 at 15:42
  • 1) No it's Vista. Java Web Start won't work my Vista ...64 bit. I canm however, open it using winzip 2.) Offline version for desktop 3.) yes... Commented May 14, 2011 at 15:47
  • 1) Can you launch the app. as a Jar by double clicking it? "1) No it's Vista. Java Web Start won't work my Vista ...64 bit." What I said in (1) had nothing to do with JWS. "I can however, open it using winzip" If WinZip is the default program for Jar files, the file association is wrong. Commented May 14, 2011 at 15:54
  • yes my file association is wrong Commented May 14, 2011 at 16:16

4 Answers 4

6

As per the comments:

my main class file does not have String (main[]) class... it shouldnb't because it's an applet

So your JAR does not represent a Java application at all? You need to convert your applet to a Java (Swing) application. Those EXE creators are for Java applications only.

Sign up to request clarification or add additional context in comments.

3 Comments

Erm. My applet is mostly AWT... so it has to be all Swing? bah... thanks.
AWT is also fine, I just didn't expect that you're still using AWT :) Just supply a main class with a main method which fires the UI, wrap this in an executabele JAR (i.e. doubleclicking it in Windows must execute it) and use the EXE converter.
Aha, I get what you're saying... mkay. Thanks
4

I prefer JEXECreator 1.9.3, it is very good and easy to use

2 Comments

Ugh. I got the SAME error using the other two programs as well as using this one. Main Class Def not ofund... pastebin.com/dB9Be8xz
my main class file does not have String (main[]) class... it shouldnb't because it's an applet...
0

This is commercial but you can try evaluation version of exe4j: http://www.ej-technologies.com/products/exe4j/overview.html

I have never seen any working free tool for this.

Comments

0

There's Excelsior JET too, it claims passed the Java Compatibility Test, which makes it equivalent to a regular compiler. I used it once.

But you should know that such solution are somewhat failure prone... I had a hard time trying to compile a rather simple Java app to EXE. In the end, it worked, to some degree.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.