62,614
社区成员
发帖
与我相关
我的任务
分享
public class CLocation{
public static void main(final String[] args) {
String path = CLocation.class.getProtectionDomain().getCodeSource().getLocation().getPath();
System.out.println(path);
System.out.println(path.substring(path.lastIndexOf("/")+1,path.lastIndexOf(".")));
}
}