i'm having problem of getting the path of the parent directory
example:
[HelloWorld]
|----[file]
| |---- PersonalizedMsg.txt
|----[classes]
|----HelloWorld.class
what i want to do is get the URL (path) to the files directory...like C:/HelloWorld/files/
iwhat i'm doing now is
String path = HelloWorld.class.getResource("./").getPath();
this will return the C:HelloWorld/classes/
however..i can't seem to go one level up (to the parent directory of [HelloWorld]
i tried with
String path = HelloWorld.class.getResource("../").getPath();
and
String path = HelloWorld.class.getResource("./../").getPath();
to get c:/HelloWorld/
but it return null;
any help would apperciated.