Q:

Java read image from 2 directories up

How can I place an image on screen that is 2 directories up? Here's my code:
package mousemaze;

// Imports
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class LoadScreen extends JPanel {
    private static final long serialVersionUID = 1L;

    private String logoPath = "././images/snakyboLogo.png";
    BufferedImage logoImage;
    JLabel logoLabel;

    public LoadScreen() {
        try {
            System.out.println(logoPath);
            logoImage = ImageIO.read(new File(logoPath));
            System.out.println("1");
            logoLabel = new JLabel(new ImageIcon(logoImage));
            System.out.println("2");
            add(logoLabel);
            System.out.println("End");
        } catch (IOException ex) {
            System.out.println("Fail");
        }
    }
}

But it fails at
logoImage = ImageIO.read(new File(logoPath));

So I think it can't find the specified file on in that directory.
My folder structure is: 

src\mousemaze\LoadScreen.java
src\images\snakyboLogo.png

So i'm guessing that this isn't how I specify a file in an entirely different package, so how do I do this? 

A:

Problem 1 - The path literal . resolves to the current directory, I assume you meant to use ...
Problem 2 - Its never advisable to read from a file in Java using relative paths. If ever your application is deployed in anything but your assumed structure, it will break

You will get more mileage from using a resource stream
InputStream logoStream = getClass().getResourceAsStream("/images/snakyboLogo.png");
if(logoStream != null) logoImage = ImageIO.read(logoStream);

