كما هو موضح أدناه:
<span style = "font-size: 18px"> system.out.println ("++++++++++++++++++++++++++++++++++") ؛ string path = system.getProperty ("java.class.path") ؛ string path2 = freemarkerWriter.class.getProtectionDomain (). getCodesource (). getLocation (). getPath () ؛ string path3 = freemarkerWriter.class.getProtectionDomain (). getCodesource (). getLocation (). getFile () ؛ string path4 = thread.currentThRead (). getContextClassLoader (). getResource (""). getPath () ؛ system.out.println ("path 1 =" + path) ؛ system.out.println ("path 2 =" + path2) ؛ System.out.println ("path 3 =" + path3) ؛ system.out.println ("path 4 =" + path4) ؛ System.out.println ("++++++++++++++++++++++++++++++++++++") ؛ </span>الطريقة البسيطة أعلاه (الموصى بها) للحصول على classpath classpath في Java هي كل المحتوى الذي أشاركه معك. آمل أن تتمكن من إعطائك مرجعًا وآمل أن تتمكن من دعم wulin.com أكثر.