You need to fill javac with options. Meaning that you can't just call javac without a file to compile. when you write javac in terminal without any arguments, by default it will run javac -help and display the options you see.
To really see if it works: Create a new java file. To compile (in the same directory): javac <java_file_name>.java To run: java <java_file_name>
发布评论
评论(1)
您需要使用选项填充
Javac
。这意味着如果没有文件编译,就不能只调用Javac。当您在没有任何参数的情况下编写Javac时,默认情况下它将运行Javac -help
并显示您看到的选项。真正看看它是否有效:
创建一个新的Java文件。
编译(在同一目录中):
Javac&lt; Java_file_name&gt; .java
运行:
java&lt; java_file_name&gt;
You need to fill
javac
with options. Meaning that you can't just call javac without a file to compile. when you write javac in terminal without any arguments, by default it will runjavac -help
and display the options you see.To really see if it works:
Create a new java file.
To compile (in the same directory):
javac <java_file_name>.java
To run:
java <java_file_name>