I don\'t whether I am asking correct question or not but want to clear my doubt.
Actually I came across the scenario of referring class files from jar file. I mean to
You should enable "Add directory entries" when creating jar files if you need to use class.getResource() method to get the URI of a particular directory inside your jar file. The reason why you may want to do this is to hold a URI to your "resource" folder for example.
If you only use class.getResource() to get the URI of a specific file [and not a directory] then you will be fine if you leave the "Add directory entries" off.