向客户端提供/导出可执行文件
我刚刚完成了客户端工具的开发,该工具使用 Jfreechart jar、dll 和用于 JNI 接口的 lib 文件。现在我想导出/向客户端提供一个可执行文件,我尝试单击 java 项目文件夹并导出 Java>Runnable Jar 文件(将所需的库提取到生成的 JAR 中),导出的 Jar 文件带有一些警告。但是,我们无法在客户端计算机上运行该文件。我该如何解决这个问题,显然我不想提供完整的Java项目并要求客户端从IDE运行。请向我提供意见。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 Java 是一个跨平台环境,因此它实际上没有像 EXE 或其他任何东西那样的“可执行文件”。相反,您可以使用 Java 运行时运行 .jar 文件。例如:
当然,一旦安装了 Java 运行时,某些操作系统就会为您执行此操作。
有一些程序可以将 .JAR 转换为 .EXE,但我相信它们只是编译一个调用 Java 运行时的薄包装器。
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:
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.