go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  getResource -- where should I put my resource file?
 
Subject: getResource -- where should I put my resource file?
Author: EricJ
Posted on: 08/26/2013 06:02:18 PM

try{
    System.out.println(this.getClass().getResource("/").toURI().toString());
    System.out.println(this.getClass().getResource(".").toURI().toString());
}catch(Exception e){
    e.printStackTrace();
}


Output:
file:/C:/Users/test/workspace/p1/WebContent/WEB-INF/classes/
file:/C:/Users/test/workspace/p1/WebContent/WEB-INF/classes/org/test/example/ 



Replies:


References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.