有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java jar非法参数

我试图从windows命令行运行jar文件,如下所示: java -jar myjar.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. # 1 楼答案

    如果您使用的是Windows命令行,那么可以使用javaw youJarFile。罐子