如何在命令行中编译多个java源文件 [英] How to compile multiple java source files in command line
本文介绍了如何在命令行中编译多个java源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道运行 javac file1.java
会产生 file1.class
如果 file1.java
是唯一的源文件,那么我只能说java file1
运行它.
I know running javac file1.java
produces file1.class
if file1.java
is the only source file, then I can just say java file1
to run it.
但是,如果我有 2 个源文件,file1.java
和 file2.java
,那么我该如何构建程序?
However, if I have 2 source files, file1.java
and file2.java
, then how do I build the program?
推荐答案
尝试以下操作:
javac file1.java file2.java
这篇关于如何在命令行中编译多个java源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文