I think many windows users find it difficult to run Java programs. They are used to double clicking on exe files. Even Java Webstart is strange for most windows users.
There's an easy way to create an exe wrapper so all a Windows user has to do it download the exe and double click on it.
All I did was:
1) checkout sources from svn
2) Create NetBeans' Maven Java application project
3) Maven expects java source files in /sportstracker/src/main/java and resources (META-INF, icons, properties, xml) in /sportstracker/src/main/resources, so copied those there.
4) Add dependencies to the POM
5) Add maven's assembly plugin to the pom
6) Run assembly:single as a custom maven goal from inside NetBeans
This creates a single jar file with all the libraries inside (no external lib directory needed) that is executable like this
java -jar sportstracker-5.3.0-jar-with-dependencies.jar
7) Convert sportstracker's icon from png to ico
8) Use launch4j to create a windows native exe file
Here's the result.
The netbeans maven project (including the POM file) is here
I hope it is useful to you and maybe this application will be more appealing to Windows users.
Launch4j still runs the program with java virtual machine, it is just a launcher.
that's a very interesting alternative for the Windows users out there. If you don't like the default double click on the JAR file behaviour, this might be your solution.
Thanks for sharing!
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.