My installation requires a few files to be added to the JRE lib and bin folders and so it is imperative that the launcher uses this JRE to run the application. Since some systems have multiple JRE installations, using the java -jar my_app.jar is not guaranteed to be using the latest JRE version that the installer uses.

I've looked at the java launcher docs and cannot find a way to specify this. It seems that the launcher simply invokes java. Any ideas?

I need something like: c:\program files\java\jre7\bin\java.exe -jar my_app.jar

asked 31 Jul '13, 22:57

JustinB's gravatar image

accept rate: 0%

If you do not provide a <preferredJavaBinary>, the Java launcher will autodetect the system Java, using the first one found by default. This behaviour can be set to use the newer one using the <selectionOrder> setting:


answered 01 Aug '13, 18:04

juanjo's gravatar image

juanjo ♦♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 31 Jul '13, 22:57

Seen: 1,093 times

Last updated: 01 Aug '13, 18:04