So this is pretty simple, I am running a set of tools on windows, however to avoid issues regarding a lack of java installation I have bundled with my installation its own jre folder which in windows allows me to simply run a java virtual machine with a .bat and run my program.
My question, am I able to do the same on linux without java, I know my program works fine on ubuntu so far as long as it has java installed, but I am now running into issues regarding certain linux computers that do not have java installed at all. How would I call the java folder inside my program to run a virtual machine to run the .jar? Would it be the same process? I already have a .sh that opens java and runs my virtual machine , it starts with a java command followed by -jar. example: java -jar -xmx1024m ./myprogram.jar .
How would I change that command above to use a java or portable java installation inside my program folder? how can I create a portable java in linux also as I am pretty sure that the jre folder I have which works on windows will not work on java.