Provide/Export executable file to client

偶尔善良 提交于 2020-01-17 02:55:09

问题


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:


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.



来源:https://stackoverflow.com/questions/7585970/provide-export-executable-file-to-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!