I have written a program that requires the JRE to be bundled with it. Launching the program via command line with the bundled JRE works, but my users do not have any knowledge of how to do this sort of thing, so I need include a launcher for the program that will work on Windows, Mac, and Linux. How can I do this? Ideally, I would like to use a language such as Visual Basic to write a launcher that can compile three executables: one for Windows, one for Mac, and one for Linux.
Asked
Active
Viewed 518 times
5
-
@WilliamBrendel I am not trying to just bundle for Windows, but Mac and Linux as well. – DaveTheMinion Apr 18 '14 at 20:34
-
Several solutions in the linked question are for Windows, OS X, and Linux. – William Brendel Apr 18 '14 at 20:36
-
@WilliamBrendel One of the answers to the question has [this link](http://oss.readytalk.com/avian/). It looks promising, but I don't seem to understand how I am to use it. – DaveTheMinion Apr 18 '14 at 20:42
2 Answers
2
I suggest providing a .bat script for Windows and an .sh script for Linux and Mac; no compilation needed.
Or if you must provide a native binary, C is nicer because it can easily be compiled on all platforms. Visual Basic is Windows specific and not very typically used for new projects.

Erik Kaplun
- 37,128
- 15
- 99
- 111
0
Confluence installer comes with its own JRE hence Confluence won't use system JRE when its run. If you want to configure Confluence to use system JRE please follow the steps below:
Shutdown Confluence
Edit <Confluence_Installation_Directory>/bin/setenv.bat
or setenv.sh
Find the following lines:
setenv.bat
SET "JRE_HOME=<Confluence_Installation_Directory>\jre"
or setenv.sh
JRE_HOME="<Confluence_Installation_Directory>/jre"; export JRE_HOME
Change the JRE_HOME
value with the absolute path of your system JRE.
Save
Restart Confluence

Alaeddine
- 1,571
- 2
- 22
- 46