Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch jar File with Bundled JRE [duplicate]

Tags:

java

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.

like image 686
DaveTheMinion Avatar asked Nov 01 '22 01:11

DaveTheMinion


1 Answers

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.

like image 180
Erik Kaplun Avatar answered Nov 15 '22 04:11

Erik Kaplun