How to convert a .java or a .jar file into a Linux executable file ( without a .jar extension, which means it's not a .jar file )

前端 未结 4 2239
醉酒成梦
醉酒成梦 2020-12-15 13:42

I have been searching for many similar posts about this but I still can\'t find my answer. I want to convert a .java program into a Linux executable file, without the .jar e

4条回答
  •  独厮守ぢ
    2020-12-15 14:24

    What you can do is make a tiny little C-program, that calls the one of the exec functions (see man 3 exec) to the "java" binary, passing "-jar", "xxx.jar" as arguments, see also Forking a new process in C++ and executing a .jar file

提交回复
热议问题