Posts Tagged jar
I always had the same problem with java programs packed with jar. How to run them in friendly manner. The best example of this can be eclipse which is run from eclipse.exe but it is written entirely in java.
I search a lot for some program which would make this easy and I found it. It’s called JSmooth.
So I had my application called Ndsr in jar file ndsr.jar
First we need to run JSmooth.
Put message which will be shown to user when appropriate JVM is not found on user’s machine.
Also check “Launch java app in the exe process.
Save configuration in folder where you have your application jar
Next go to application tab and click icon with ‘+’ to add this jar.
Then click on ‘…’ button next to Main class text field to choose main class (this should be done automatically if you have main class defined in manifest but isn’t)
Choose your main class from ‘Available Classes’ and click select
Go to Executable tab and put name of your application with exe extension
You can also choose icon but there are some problems with .ico files (another bug) and png files are very ugly resized.
I next post I will describe how to change/add icon in exe files.
Then we need to specify JVM version so we need to go to JVM Section tab
Put version in Minimum JVM Version field.
If you need any specific JVM arguments go to JVM Configuration tab
So we are ready to go. Just click icon with gear or go to Project > Compile in menu.