关于java中的类的路径

来源:互联网 发布:淘宝宝贝上架怎么操作 编辑:程序博客网 时间:2024/06/11 08:40

1. 当前工程路径

System.getProperty("user.dir") 

2. 当前类所在的classpath路径

getClass().getResource( "" ).getFile()

3.工程所有的classpath路径

System.getProperty( "java.class.path" )

0 0
原创粉丝点击