How to install Java application to my linux system

后端 未结 2 695
悲&欢浪女
悲&欢浪女 2021-01-25 11:00

I have written a Java application that analyzes my phone bills and calculates the average. At the moment I execute it like:

$ java -jar analyze.jar bill_1.pdf bi         


        
2条回答
  •  醉话见心
    2021-01-25 11:25

    What you did so far is basically "the native" way.

    You have to keep in mind: Java applications are compiled to byte code. There simply is no binary for your application that you could invoke. You do need this detour of calling some JVM installation with a pointer to the main class you want to run. In owhther words; that is what the vast majority of java applications are doing.

    Theoretically, there are products out that there that you could use to actually create a "true" binary from your application; but that isn't an easy path (see here for first starters); and given your statement that your just looking for more "convenience" it is definitely inappropriate here.

提交回复
热议问题