passing parameter to a jar file which is called in a bat file?

前端 未结 3 851
花落未央
花落未央 2021-01-20 12:47

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

3条回答
  •  自闭症患者
    2021-01-20 13:20

    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
    

提交回复
热议问题