Hi,
Another problem with resources on classpath by me
I am trying to access resource on classpath using getResourceAsStream:
If path is something like this:
, then I have no problems.
However, I have situations where I must use "go to parent" sign ../ to access certain files. I am constructing path manually based on certain parameters.
Final result is something like this:
.
This works fine in Eclipse. It works fine when I run it outside of eclipse (from command line in programs target folder where .class are contained). However, as soon as I pack those in jar file, it throws nullpointer exception.
Is there a possibility for getResourceAsStream to support such a format when exported to jar.
If not, is there a Java/Utility class that can get file path without ../ signs. For example to convert
to
format?
Thanks in advance!