Community

jBoss folders in classpath?

reply from jaikiran pai in Beginner's Corner - View the full discussion

Bruno Melloni wrote:

 

 

I thought that server/<enviroment>/conf and server/<enviroment>/lib were among them, but the application is having trouble reading the file when I use specificy it as being at "classpath:<filename>.xml".

 

 

If you have placed a xyz.xml file in JBOSS_HOME/server/< servername>/conf folder (which is by default in the classpath) then in your java code, you can do this:

 

InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("xyz.xml"); 

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community