def run_jar(self, mem=None):
        """
        Special case of run() when the executable is a JAR file.
        """
        cmd = config.get_command('java')
        if mem:
            cmd.append('-Xmx%s' % mem)
        cmd.append('-jar')
        cmd += self.cmd
        self.run(cmd)