0

is there a way to compile java files into executable with high quality free software and without going through using executable JAR files?

George Stocker
  • 57,289
  • 29
  • 176
  • 237
Mark
  • 10,754
  • 20
  • 60
  • 81

4 Answers4

4

There are several ways to do it. But you should in general avoid making a java application executable on one platform just because you don't like double clicking JAR files. That defeats the purpose of interoperable nature of Java.

Spoike
  • 119,724
  • 44
  • 140
  • 158
  • Agree. A better approach is to provide a JAR file and a bunch of launchers, i.e. .bat, .sh etc – SCdF Jan 15 '09 at 10:12
  • Why was this downvoted? I thought it was quite a good point. – Kieran Senior Jan 15 '09 at 10:12
  • 1
    The poster wants to compile Java files into executables. What does that have to do with interoperability? He does with his Java programs what he wants. – eljenso Jan 15 '09 at 10:15
  • 1
    Just because you're providing an EXE to launch your Java program doesn't mean you don't care about interoperability. And just because you're using Java doesn't mean you DO care about interoperability either. – Mr. Shiny and New 安宇 Jan 15 '09 at 14:15
  • @eljenso: In most operating systems nowadays JAR files *are* indeed executable. – Spoike Jan 16 '09 at 16:12
3

There's a nice page on Javalobby that discusses this in some detail, as well as going through several different styles you might want to do this and providing links to appropriate tools (broken down into free and commercial).

Some of the free EXE-generating tools are

  1. jstart32
  2. Launch4j
  3. JSmooth

and while I've never needed one of these so can't offer my opinion on their effectiveness, they all appear to do the simple task well.

Andrzej Doyle
  • 102,507
  • 33
  • 189
  • 228
2

There are several wrappers available. I have no experience with them, but you might try the following or google for some more:

Sebastian Dietz
  • 5,587
  • 1
  • 31
  • 39
0

In others words, you want to create an EXE file from your JAR file ? There are some software for that, such as JSmooth or Launch4J

Romain Linsolas
  • 79,475
  • 49
  • 202
  • 273