[英]Run jar file with arguments without having to use command line
I am using Alpn-boot
to add support for HTTP.2 requests using OkHttp . 我使用
Alpn-boot
,以增加对HTTP.2使用OkHttp请求的支持。 In order for that to work i always have to launch my compiled jar file through the command line and specify the path of alpn-boot.jar
file with a <-Xbootclasspath>
argument : 为了
alpn-boot.jar
正常工作,我始终必须通过命令行启动编译的jar文件,并使用<-Xbootclasspath>
参数指定alpn-boot.jar
文件的路径:
java -jar -Xbootclasspath/p:<path_to_alpn-boot.jar> <path_to_myjar.jar>
Is there anyway to avoid this, and make the jar run with the -Xbootclasspath argument specified by default? 无论如何,要避免这种情况,并使用默认指定的-Xbootclasspath参数使jar运行?
Edit: I thought about using a batch file to do this, but is there no other native way? 编辑:我考虑过使用批处理文件来执行此操作,但是没有其他本机方法吗?
Batch file is convenient and standard enough. 批处理文件方便且足够标准。 Unless you have specific reason not to use batch file, batch file would do it
除非您有特定原因不使用批处理文件,否则批处理文件将执行此操作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.