View Single Post
  #2 (permalink)  
Old 08-01-2007, 02:27 AM
brianhks brianhks is offline
Senior Member
 
Join Date: Jul 2007
Posts: 134
brianhks will become famous soon enough
this.getClass().getClassLoader().getResourceAsStre am("relativePathInJar") is your friend.

So say the file is config.xml in the conf directory inside your jar file. The command will be:
this.getClass().getClassLoader().getResourceAsStre am("conf/config.xml");
Reply With Quote