Assuming that class
ClassB is inside package
package_a:
Relative resource paths work similar to relative file paths; you can use .. to go up one level.
By the way,
you should never ever catch exceptions and ignore them like that. If an exception occurs you won't know what went wrong.