I'm using the URL
class in a program to load a bitmap image and I was wondering if Java will recognize ../
to exit the current directory like CSS and HTML or there is another way to accomplish this.
Here's the code segment to illustrate my question:
zombieOneRight = Zkit.getImage(getURL("../_images/_production_images/zombie_1_right_75h.png")); // will the ../ work here
private URL getURL(String filename)
{
URL url = null;
try
{
url = this.getClass().getResource(filename);
}
catch (Exception e) {}
return url;
}