如何将IeEmbed.exe和MozEmbed.exe打包成可执行Jar文件
我在可执行 Jar 文件中使用 JDIC,当它运行时,它需要将 IeEmbed.exe 和 MozEmbed.exe 放在与 Jar 文件相同的目录中,我想知道是否有一种方法将所有 3 个文件打包到一个可执行 Jar 中文件,所以当我分发应用程序时,只需担心一个可执行 Jar 文件,此外,发送和下载 *.exe 文件也存在问题,如何解决?
例如,我的可执行 Jar 文件名为 Java_App.jar,如何将 <1>IeEmbed.exe <2>MozEmbed.exe 和 <3>Java_App.jar 获取到名为:My_App.jar 的 Jar 文件中,以及何时用户双击My_App.jar,它将运行Java_App.jar,并从My_App.jar包中找到所需的IeEmbed.exe和MozEmbed.exe文件,而无需解压并将它们保存到本地目录中。
I use JDIC in my executable Jar file, when it runs, it needs to have IeEmbed.exe and MozEmbed.exe in the same dir as the Jar file, I wonder if there is a way to package all 3 files into a single executable Jar file, so when I distribute the app, there is only one executable Jar file to worry about, besides, there are problems sending and downloading *.exe files, what's the solution ?
For instance, my executable Jar file is called Java_App.jar, how to get <1>IeEmbed.exe <2>MozEmbed.exe and <3>Java_App.jar into a Jar file called : My_App.jar, and when user double clicks on My_App.jar, it will run the Java_App.jar and find the needed IeEmbed.exe and MozEmbed.exe files from inside the My_App.jar package without unpacking and save them into a local dir.
将它们包装在一起本身没有问题。 jar 文件最终是一个 .zip 文件。
当您的应用尝试加载它时就会出现问题,因为它无法在系统路径中找到
.exe
。解决方案是制作一个可安装文件(可以是 .zip 文件)并展开并复制
.exe
文件,例如在“bin”目录中There is no problem packaging them together per se. The jar file is finally a .zip file.
The problem will come when your app try to load it because it won't be able to find the
.exe
in the system path.The solution is to make an installable file ( which can be a .zip file ) and expand and copy the
.exe
file for you for instance in a "bin" directory