It was pointed out to me that I should be using
getClass().getResourceAsStream("file"), rather than
getClass().getResource("file");Using the inputStream, everything works fine. > -----Original Message----- > From: David > Sent: 19 September 2004 13:13 > To: [EMAIL PROTECTED] > Subject: [Configuration] Problem getting resource in a JAR file > > > > Dear list, > > There appears to be a problem locating a resource when the resource is > located in a JAR file. > > The path seems to somehow get used twice, ending up with this URL: > > K:\myproject\target\test\file:\K:\myproject\target\deliverables\ja > rs\my-jar- > SNAPSHOT.jar!\conf\test.xml > > > When it should (I think) be this URL: > > file:\K:\myproject\target\deliverables\jars\my-jar-SNAPSHOT.jar!\c > onf\test.x > ml > > > > Any ideas? > > I would gladly send more info, if required. > > > Thanks! > Dave > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
