Java裏面加載資源會用到的一些路徑

    記錄下,備忘。   blog       不少時候咱們想知道正在執行的class文件或者jar所在的路徑,以方便加載一些資源。下面的一些方法能夠幫助到咱們:資源  1       System.out.println(System.getProperty("user.dir"));  2       System.out.println(XXX.class.getProtectionDom
相關文章
相關標籤/搜索