1

Possible Duplicate:
How can I convert my Java program to an .exe file?

Sorry for a newbie question, just starting with Java under windows... what is the best way to convert an executable jar file into a windows exe file?

If possible, so that the GUI would also become windows-style, as the java's gui seems kinda ugly. :)

Thanks!

Community
  • 1
  • 1
Roger Travis
  • 8,402
  • 18
  • 67
  • 94
  • yu will have to use installshield fm nullsoft – Satya Jun 03 '12 at 16:58
  • [Here's a reference](http://www.excelsior-usa.com/articles/java-to-exe.html) that I found with a bit of Googling. I'm not sure the purpose of it, but hopefully that provides you a hint or two. – Makoto Jun 03 '12 at 16:59
  • 1
    Launch it using [Java Web Start](http://stackoverflow.com/tags/java-web-start/info). That will work on Windows, *nix & OS X. Use the native look & feel. If you really just want an EXE, consider using .Net. – Andrew Thompson Jun 04 '12 at 00:29

1 Answers1

6

Try JSmooth or launch4j.

Both are free and will allow you to create java executable, and will automatically find / download JRE on users' workstations.

Also note, that the look-and-feel of your Java application is up to you. You declare the look and feel using

UIManager.setLookAndFeel(
        UIManager.getCrossPlatformLookAndFeelClassName());

and this way you replace default look-and-feel (which i think is Metal). Place it somewhere at the very beginning of your main() method (or at least before swing initializes).

Also read about other ways of changing Java look and feel.

npe
  • 15,395
  • 1
  • 56
  • 55
  • About the look-and-feel: Other option would be to use [SWT](http://www.eclipse.org/swt/) as the GUI framework. – buc Jun 03 '12 at 17:04
  • @buc SWT is a way, but it's not entirely java, requires native libraries, and has quite different philosophy. I don't think, that the decision whether to chose SWT or not should be taken when consdering LAF. There are much more important aspects to consider in such decision, than LAF. – npe Jun 03 '12 at 17:07