简体   繁体   English

使用批处理脚本在嵌入式JRE中运行Jar文件。

[英]Running Jar file with embedded JRE using batch script .

If i want to embed JRE with my application, i have this directory structure. 如果我想将JRE嵌入到我的应用程序中,则具有此目录结构。

+---jre
|   +---bin
RunMyApp.bat
myApp.jar

i have added this statement in RunMyApp.bat to access the java.exe 我在RunMyApp.bat中添加了此语句以访问java.exe

jre\bin\java.exe -help

Then how to run the myApp.jar, using RunMyApp.bat script? 然后如何使用RunMyApp.bat脚本运行myApp.jar?

i have tried this one, but not succeed 我已经尝试过这个,但没有成功

jre\bin\java.exe  -jar "%cd%\..\..\myApp.jar"

将一个条目添加到您的MANIFEST.MF(在META-INF目录下)的Main-Class属性,然后说jre\\bin\\java.exe -jar <your-jar-filename>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM