Archive: Installer exe for the java based app


Installer exe for the java based app
I m new to write installer scripts, NSIS is my first script. I m writing script for java based app.

How can built an exe file ,insteed of batch file that i built for now, to start my app. , if it is possible?

If i cant make an exe then how can i change the default icon of batch files ?


See the NSIS Archive for Java detection code.


hi Joost,

I searched the NSIS Archive but I didnt get any help there.
If you can tell me how can I change the icon of the .bat file that i hv created then it'll be fine.


just make a shortcut to the batch on the desktop and change the icon of the batch

it's the most simple way I think

hope this helps

greetz Dave


lol... I wannna do that with the help of script,
thanx for giving such a simple solution.


http://nsis.sourceforge.net/archive/...php?pageid=315


hehe ok, I'll give you a sample:

you install the batchfile into the $INSTDIR(wherever you want it to be)

and after this you use this script:

CreateShortCut "$DESKTOP\YourShortCut.lnk" "$INSTDIR\bla.bat" "" "$INSTDIR\IconForYourBatch.ico"

hope this helps really ;D

greetz Dave


yeh Joost,

I tried both the installer, one with java.exe and other with javaw.exe and changed them according to my application i.e i set the classpath, main class name , command line arg. and VM parameters.
But it doesn't run my app.
What else need to be done in that script ?

hi davion,
your solution can only change the icon of the shortcut but i need to change the actual icon of .bat file or else make .exe instead of .bat


My app runs fine with .bat file but with launcher exe it executed fine but fails to run my app. It also wasn't give any error.
I placed the launcher exe at the same place where my bat file was located.

Please help.


Hey please help me. I did much of RnD in java launcher.
I tried executing the command specified in 'Exec' at the command prompt & it ran fine. So, why its not working in the script with the Exec instruction.

Even when I change the name of the main class name in command , it doesn't give me any error.
when use java.exe instead of javax.exe, new window pops up but disappears in a blink of eye, so cant get to know what it shows in that.

What can be the problem, Please suggest ??


Display the content of $0 in a messagebox before the Exec command and see what's wrong.


Yeh I did that and it shows only half of the command.
Actually my classpath itself is too long so it shows only part of the classpath.
Yeh this is the problem but whats the solution for this ?


How long is it? If the string is longer than 1024 characters get a special build at the NSIS site.


Yes it is far more than that. Can u give the url..


Originally posted by Sharad
Yes it is far more than that. Can u give the url..
Joost is very busy man and you should be thankful for he even bothering to respond to your messages.

It's very unpolite of you not even trying and expecting someone to do your work.

http://nsis.sourceforge.net/

At least I do appreciate your efforts, Joost. Keep up the good work:up:

sorry for that, but i knew that url but i dont know which build he is talking about?
I hv gone thru NSIS home page..
sorry once again but if u can provide with some help..?


http://nsis.sourceforge.net/download/special_builds/


Yeh it worked. Thanx for all ur help.
I know u r very busy but will get back to u if i 'll hv another problem.

THANX ONCE AGAIN