Monday, January 13, 2003 12:36 PM
I have a program that needs to find a file in an "earlier" directory. I know the code below is close, but there is still something wrong, but I dont' know what. Any help?
InputStream is = PKI.class.getClass().getResourceAsStream("/rsaPUB.txt");
this will get rsaPUB.txt if it's in the same directory but not in directories "above" it
InputStream is = PKI.class.getClass().getResourceAsStream("rsaPUB.txt");
won't get anything, it's that slash that helps, but still, i can't get anything above...