2
用下面的代码我想表明我PROGRAMM的位置:在Windows越来越APPPATH XP
String myPath = getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
在Windows 7上它完美的作品,所以我得到以下结果:
C:/Users/Admin/...
但我问题是Windows XP。我收到以下URL:
C:/Dokumente%20und%20Einstellungen/Admin/...
我该如何在代码中替换这个%20
?!
这不起作用:myPath.replaceAll("%20"," ")
*“我想显示我的程序的位置:”*为什么?这是为了支持哪些应用程序功能? – 2013-04-20 12:46:16