How to define a relative path in java

Here is the structure of my project : I need to read config.properties inside MyClass.java. I tried to do so with a relative path as follows : This gives me the following error : How can I define a relative path in Java? I’m using jdk 1.6 and working on windows.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)