busukxuan
busukxuan

Reputation: 327

What is a Java executable's filename extension?

If C# or VB.NET is distributed in .exe files as MSIL codes, what is Java distributed in? Is there an equivalent form of .exe files for Java (other than .jar files, which I don't think is good for distribution on computers). Or is there a way to save Java intermediate language(?) in an exe like MSIL does? Then distribute it in an exe which is still run by the JRE upon execution.

Upvotes: 4

Views: 13746

Answers (3)

Andrew Thompson
Andrew Thompson

Reputation: 168835

Use Java Web Start to install the app. JWS offers auto-update, splash screens and a lot of other nice functionality.

The user gets desktop shortcuts and menu items if they are requested in the launch file and supported on the OS of the user. Those shortcuts might have icons as supplied by the developer.

What 'jar', what 'exe'? Why show the user either when installing a Java rich client? Using JWS would require Jar files, but the user never sees them.

Upvotes: 3

Wojciech Owczarczyk
Wojciech Owczarczyk

Reputation: 5735

You can use Launch4J to create executable *.exe files from *.jar files, but this is platform specific and using runnable *.jar files is recommended.

For more information on how to make executables with Java please take a look at this thread.

Upvotes: 4

Fred Foo
Fred Foo

Reputation: 363707

Java "executables" are either .class or .jar files. It's common to deliver a script (.bat file for Windows) with a Java program to run it.

Upvotes: 6

Related Questions