You can get at some/pkg/resource.properties programmatically from your Java code in several ways. First, try:
ClassLoader.getResourceAsStream ("some/pkg/resource.properties");
Class.getResourceAsStream ("/some/pkg/resource.properties");
ResourceBundle.getBundle ("some.pkg.resource");
Additionally, if the code is in a class within a some.pkg Java package, then the following works as well:
Class.getResourceAsStream ("resource.properties");
Note the subtle differences in parameter formatting for these methods. All getResourceAsStream() methods use slashes to separate package name segments, and the resource name includes the file extension. Compare that with resource bundles where the resource name looks more like a Java identifier, with dots separating package name segments (the .properties extension is implied here). Of course, that is because a resource bundle does not have to be backed by a .properties file: it can be a class, for a example.
To slightly complicate the picture, java.lang.Class's getResourceAsStream() instance method can perform package-relative resource searches. To distinguish between relative and absolute resource names, Class.getResourceAsStream() uses leading slashes for absolute names. In general, there's no need to use this method if you are not planning to use package-relative resource naming in code.
It is easy to get mixed up in these small behavioral differences for ClassLoader.getResourceAsStream(), Class.getResourceAsStream(), and ResourceBundle.getBundle(). The following table summarizes the salient points to help you remember:
method: ClassLoader.getResourceAsStream()
parameter: "/"-separated names; no leading "/" (all names are absolute)
lookup failure: Silent (returns null)
example: this.getClass().getClassLoader().getResourceAsStream("some/pkg/resource.properties")
method: Class.getResourceAsStream()
parameter: "/"-separated names; leading "/" indicates absolute names; all other names are relative to the class's package
lookup failure: Silent (returns null)
example: this.getClass().getResourceAsStream("resource.properties")
method: ResourceBundle.getBundle()
parameter: "."-separated names; all names are absolute; .properties suffix is implied
lookup failure: Throws unchecked java.util.MissingResourceException
example: ResourceBundle.getBundle("some.pkg.resource")