open resource with relative path in Java
I had problems with using the getClass().getResource(“filename.txt”) method. Upon reading the Java docs instructions, if your resource is not in the same package as the class you are trying to access the resource from, then you have to give it relative path starting with “https://stackoverflow.com/”. The recommended strategy is to put your resource files under … Read more