Get the path to the Class file

xiaoxiao2021-03-06  106

Take the path where the Class file is located

URL URL = INTERNALBOOTLoader.class.getProtectionDomain (). GetCodesource (). GetLocation (); string path = url.getfile ();

If the Class is located in the JAR package, you get the path to the JAR file in Path.

转载请注明原文地址:https://www.9cbs.com/read-101021.html

New Post(0)