Provide/Export executable file to client

2019-08-17 11:02发布

I just completed working on a client's tool, which uses Jfreechart jar, and dll and a lib file for JNI interface. Now I would like to export/ provide a executable file to client, I tried to click on java project folder and export Java>Runnable Jar file (extract required libraries into generated JAR) , a Jar file is exported with some Warnings. However, we are not able to run the file on client's machine. How can I fix this, obviously I don't want to provide complete Java project and ask client to run from and IDE. Please provide me inputs.

1条回答
祖国的老花朵
2楼-- · 2019-08-17 11:22

Since Java is a cross-platform environment, it doesn't really have "executable files" like EXEs or anything. Instead, you run your .jar file with the Java runtime. For example:

C:\>java.exe MyProgram.jar

Of course some operating systems will just do this for you once the Java runtime is installed.

There are some programs to convert .JAR to .EXE, but I believe they just compile a thin wrapper that calls into the Java runtime.

查看更多
登录 后发表回答