参数传递到被称为一个bat文件的JAR文件? [英] passing parameter to a jar file which is called in a bat file?

查看:236
本文介绍了参数传递到被称为一个bat文件的JAR文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了需要在一个bat文件被称为一个罐子。我需要通过所有bat文件收到的罐子命令行参数。任何人都可以请帮助我。我知道这是一个愚蠢的问题,但我没有对罐子和蝙蝠的想法。在网上我无法找到两者的结合。另外请注意,我不知道如何retieve命令行参数的bat文件。

I have created a jar which needs to be called in a bat file. I need to pass all the command line arguments recieved by bat file to the jar. Can anyone please help me out. I know this is a stupid question, but i dont have any idea about jar and bat. On net i am unable to find the combination of both. Also note that i dont know how to retieve the command line arguments in the bat file.

推荐答案

在里面你bat文件,您将有的Java 命令结果
只需使用 Java的罐子的HelloWorld.jar firstParam secondParam 和结果,我相信你也可以使用,因为,我们如何通过PARAMS到的Maven ANT 等结果

Inside you bat file you will have java command
just use java -jar helloworld.jar firstParam secondParam and
I believe you can also use because that how we pass params to Maven and ANT etc

mybatchFile.bat -DfirstParam -DsecondParam

这篇关于参数传递到被称为一个bat文件的JAR文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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