?
You don't access the "jar", the VM just has a ClassLoader which has a Bunch of Stuff available to it, fed to it by various means like jars, either locally or remotely. The way you access resources on the classpath
is the same no matter how the code is deployed, that is, you use
1
| someInstance.getClass().getResource("..."); |
or
1
| someInstance.getClass().getResourceAsStream("..."); |
to get it. If the classpath has your jar in it, it'll be able to find the resources in there. If you don't prepend a "/" to the path, then the path is assumed to be the "package path", eg. if the class is "com.foo.Blah" then no slash will look under "com/foo/" for resources. If you want to package stuff up at the root level, prepend the "/" to the path.
It's not rocket science!
Cas
