views:

25

answers:

2

InputStream is = this.getClass().getResourceAsStream("/ParseExample/service1.xml");

The code above generates a java.io.IOException: Root is not accessible.

This is the structure of the project folder http://www.fileden.com/files/2010/5/28/2872707//projectfiles.JPG

How can I properly locate the file? What path should be used?

A: 

Check your jar file, "service1.xml" must be inside "ParseExample"

anupsth
+1  A: 

You need to put the files in the /res folder in your jar, see this example.

funkybro
Got it! Thanks dude :D
cancelledout