Java Code:
1 2 3 4 5 6 7 8 9 10 11 | public class JavaPrintClassPath { public static void main(String[] args) { String strClassPath = System.getProperty("java.class.path"); System.out.println("Java Classpath :" + strClassPath); } } |
System.getProperty(“java.class.path”) returns the classpath of my program.