向客户端提供/导出可执行文件 [英] Provide/Export executable file to client

查看:238
本文介绍了向客户端提供/导出可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成了一个客户端的工具,它使用Jfreechart jar,和dll和一个lib文件的JNI接口。现在我想导出/提供一个可执行文件给客户端,我试图点击java项目文件夹并导出Java> Runnable Jar文件(将所需的库提取到生成的JAR),一个Jar文件导出与一些警告。但是,我们无法在客户机的机器上运行该文件。我如何解决这个问题,显然我不想提供完整的Java项目,并要求客户端从IDE运行。请提供我的投入。

解决方案

由于Java是一个跨平台的环境,它并没有真正具有像EXE或任何东西的可执行文件。而是使用Java运行时运行.jar文件。例如:

  C:\> java.exe MyProgram.jar 

当然,一旦安装了Java运行时,一些操作系统就会为您执行此操作。



有一些程序将.JAR转换为.EXE,但我相信他们只是编译一个调用Java运行时的薄包装。


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.

解决方案

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.

这篇关于向客户端提供/导出可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆