[英]How do I know which classes have been compiled
I have a file A.java
and a classpath to find other necessary classes. 我有一个文件A.java
和一个类路径来查找其他必要的类。
So, I compile with 所以,我用
javac -cp myclasspath A.java
javac
compiles A.java
and whatever other files it needs from the classpath. javac
编译A.java
及其从类路径中需要的任何其他文件。
How can I know which exact files from the classpath have been compiled, besides A.java
? 除了A.java
,我怎么知道从classpath编译了哪些文件?
You can run javac with the -verbose option , and parse the results. 您可以使用-verbose选项运行javac,然后解析结果。
-verbose Verbose output. -verbose详细输出。 This includes information about each class loaded and each source file compiled. 这包括有关装入的每个类和编译的每个源文件的信息。
After you've cleaned your buildspace from class files, build and run a search command on your classpath, like 从类文件中清除构建空间后,请在类路径上构建并运行搜索命令,例如
Code : 代码:
find CLASSPATH -name "*\.class"
if you are on a unixolike
os. 如果您使用的是unixolike
操作系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.