'It is not working' ist not a valid problem description. Are there by chance any exceptions thrown?
This code prints something like jar:file:/E:/Workspace/SomeProject/lib/somelib.jar!/some.file on my system. You can see the path within the jar file (it's directly under root, no subfolder inside the jar). If you'd like to read from a subfolder, you'd have to call something like
Censorship is the younger of two shameful sisters, the older one bears the name inquisition. -- Johann Nepomuk Nestroy
Joined: Nov 11, 2009
URL result is NULL.
The property file is there in the jar file. I have checked it by un-jar the file. Is there any issue of loading the file from inner folders? My main file is in the Folder
Joined: Nov 18, 2006
And you're sure the JAR file is in your classpath? And you're sure you spelled your folder hierarchy and filename correctly?
Or just "/sysProp.properties". Using ClassLoader.getResource(AsStream) the path is always relative to the root of the JAR file. Using Class.getResource(AsStream) the path is always relative to the class file itself, unless if it starts with a /.