java 获取类路劲注意点

在resin里用MyConstants.class.getResource("/").getPath(),这个方法时,获取到的路劲少【项目名称】,最好用MyConstants.class.getResource("").getPath()这个方法,不会少。

posted on 2014-10-14 14:38  xiong2012  阅读(246)  评论(0)    收藏  举报