You can use getRealPath that don't throws exception.