經安全檢測,此網站為安全網站,請放心前往原始網址!

How to read a file (e.g txt file) from another java package withouth specifying the absolute path? -

I have stored non-java files in a package. I want to read files from this package without specifying the absolute path to the file(e.g C:\etc\etc...). How should I do this? ... Use getResourceAsStream For example: MyClass.class.getResourceAsStream

stackoverflow.com

網址安全性掃描由 google 提供