I have a words.txt file that I have put in a particular java package and would need to read it from that same location. I do not control the deployment, so I don't know where the packages will be deployed.
Example location: com/example/files/words.txt .
I know how to use the ResourceBundle class to read properties file from the package hierarchy rather than a relative/absolute path. like ResourceBundle.getBundle(com.example.files.words) Is there something similar for general files so that I can read it from the package hierarchy rather than some absolute/relative path?