更新时间:2022-11-03 08:36:13
javac
是Java编译器。 java
是JVM和您用于执行Java程序。你不执行 .java
文件,它们只是源文件。
大概有 .jar
在某处(或一个包含 .class
文件的目录)在Eclipse中构建它:
javac
is the Java compiler. java
is the JVM and what you use to execute a Java program. You do not execute .java
files, they are just source files.
Presumably there is .jar
somewhere (or a directory containing .class
files) that is the product of building it in Eclipse:
java/src/com/mypackage/Main.java
java/classes/com/mypackage/Main.class
java/lib/mypackage.jar
从目录 java
execute:
From directory java
execute:
java -cp lib / mypackage.jar主要arg1 arg2
java -cp lib/mypackage.jar Main arg1 arg2