mtlFile might be not null, but does the actual file exist? For desktop jPCT, it's best to set the Logger to ON_ERROR_THROW_EXCEPTION, so that it exists early. jPCT-AE already does this, the desktop version just doesn't for compatibility reasons. Maybe that reveals the actual problem.