batch file to run jar file with parameters

后端 未结 4 2034
南旧
南旧 2021-01-04 22:51

How can I run a batch file and pass parameters to jar file?

this doesn\'t work

mybat.bat

java -jar log_parser.jar %1 %2 %3 %         


        
4条回答
  •  春和景丽
    2021-01-04 23:40

    1) You could try to use

    "-Dfile=C:\trace_small.log -Dstr=Storing"

    The variables would be set as Java System Property, but not as Parameters into a main-method.

    2) Try to put the arguments without '='

    log_parser.bat -file C:\trace_small.log -str Storing

提交回复
热议问题