java -jar非法参数

时间:2017-10-23 07:07:43

标签: java jar

我试图从Windows命令行运行一个jar文件,如下所示: -jar: illegal argument usage: java [-options] class 我收到以下错误消息

-help             print out this message
-version          print out the build version
-v -verbose       turn on verbose mode
-debug            enable remote JAVA debugging
-noasyncgc        don't allow asynchronous garbage collection
-verbosegc        print a message when garbage collection occurs
-noclassgc        disable class garbage collection
-ss<number>       set the maximum native stack size for any thread
-oss<number>      set the maximum Java stack size for any thread
-ms<number>       set the initial Java heap size
-mx<number>       set the maximum Java heap size
-classpath <directories separated by semicolons>
                  list directories in which to look for classes
-prof[:<file>]    output profiling data to .\java.prof or .\<file>
-verify           verify all classes when read in
-verifyremote     verify classes read in over the network [default]
-noverify         do not verify any class
-nojit            disable JIT compiler

其中选项包括:

{{1}}

任何人都知道为什么会这样?

1 个答案:

答案 0 :(得分:1)

如果您使用的是Windows命令行,则可以使用javaw youJarFile.jar