如何将参数从windows批处理脚本传递到java
我需要在java程序中读取windows批处理脚本中定义的一些参数。。。 如何定义参数。。? 例如 我需要读取脚本中定义的变量; 变量v=XYX 我试着(在脚本中)定义like 但有以下例外如何将参数从windows批处理脚本传递到java,windows,batch-file,Windows,Batch File,我需要在java程序中读取windows批处理脚本中定义的一些参数。。。 如何定义参数。。? 例如 我需要读取脚本中定义的变量; 变量v=XYX 我试着(在脚本中)定义like 但有以下例外 Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) w
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
您必须首先调用类的main方法 java com.xyz.MyClass-Dvariable=XYX
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM