Shortcut to javaw or other preexisting .exe - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mari
Posts: 6
Joined: Thu Mar 17, 2011 10:18 am

Shortcut to javaw or other preexisting .exe

I would like to create a shortcut for launching my java product from jar, _not_ from .exe wrapper. Is it possible to define shortcut such as javaw -jar myProduct.jar?

I tried adding a shorcut using wixard "A preexisting file on target machine"
- target "javaw" or "javaw.exe"
- arguments "-jar" myProduct.jar
- working dir "APPDIR"

Javaw is in path and should be found. Adding the full path to the target did not help either. Build is fine, installer just won't create the shortcut.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Shortcut to javaw or other preexisting .exe

Hello,

The recommended approach would be to add a search in the Search Page for "javaw.exe" and use the search name as a formatted reference in the target field of the shortcut. Something like:

Code: Select all

[YOUR_JAVAW_RESULT_PROPERTY]
If you know its path, you can try to create a public property in the Install Parameters Page and assign it there.

The external shortcut is designed to be installed only if the target field starts with a formatted reference to a property.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mari
Posts: 6
Joined: Thu Mar 17, 2011 10:18 am

Re: Shortcut to javaw or other preexisting .exe

Both ways work. Thank you very much.

- Mari -
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Shortcut to javaw or other preexisting .exe

You are welcome, glad to assist.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”