Question:
How can I obtain a list of all classes, including their children, belonging to a specific package, regardless of whether they are currently loaded in the JVM?
Answer:
While it's not a programmatic solution, you can employ the java command with the -verbose:class flag:
1 |
|
The JVM will then log the classes it is loading and their sources:
1 2 3 4 5 6 7 8 9 10 |
|
For further information, please refer to the following resource: [Verbose Class Loading](https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/java.html#classloading).
The above is the detailed content of How to List All Classes in a Specific Package, Loaded or Not, in the JVM?. For more information, please follow other related articles on the PHP Chinese website!