Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a *standalone* linux executable from java code

I know that java intent is for gui and multi platform, but the problem I'm facing it how to release a java application into a linux servers, which I don't have control on, i.e. I dont know what java vm is installed if at all.

So, how do i compile this into a true standalone linux exe, do not assume any pre installed package on the target linux.

public class MyTest {
    public static void main(String[] args) {

        System.out.println("You passed in: " + args[0]);

    }
}
like image 647
shahav Avatar asked Oct 26 '25 07:10

shahav


1 Answers

You need to specify as a requirement an installed JRE.
Otherwise you would need to deliver a JRE yourself as part of the deliverable application

like image 54
Cratylus Avatar answered Oct 28 '25 21:10

Cratylus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!