获得执行jar的运行路径-使用java.class.path 和 codesource的location

来源:互联网 发布:云计算用什么编程语言 编辑:程序博客网 时间:2024/05/01 07:22

SimpleMinaServer.class.getProtectionDomain().getCodeSource().getLocation().getPath().replace("%20", " ")得到的jar目录

http://jahu.iteye.com/blog/1797050

获得执行jar的运行路径-使用java.class.path 和 codesource的location

http://blog.sina.com.cn/s/blog_605f5b4f01010h6g.html




原创粉丝点击