def setupServer(self, javabin, args, classpath):
    is_win = (sys.platform == 'win32')
    separator = (';' if is_win else ':')
    fileSeparator = ('\\' if is_win else '/')
    classpathset = set(classpath.split(separator))
    environ = os.environ.copy()
    if ('CLASSPATH' in environ):
        classpathset.union(environ['CLASSPATH'].split(separator))
    environ['CLASSPATH'] = separator.join(classpathset)
    if (vim.eval('get(g:, "JavaComplete_JavaviLogLevel", 0)') != 0):
        defaulttmp = ((tempfile.gettempdir() + fileSeparator) + 'javavi_log')
        logdir = vim.eval(("get(g:, 'JavaComplete_JavaviLogDirectory', '%s')" % defaulttmp))
        if (not os.path.isdir(logdir)):
            os.mkdir(logdir)
        self.logfile = open(('%s%s%s' % (logdir, fileSeparator, 'javavi_stdout.log')), 'a')
        output = self.logfile
    else:
        output = subprocess.PIPE
    args = (([javabin] + args) + ['-D', str(SERVER[1])])
    if (is_win and vim.eval('has("gui_running")')):
        info = subprocess.STARTUPINFO()
        info.dwFlags = 1
        info.wShowWindow = 0
        self.popen = SafePopen(args, env=environ, stdout=output, stderr=output, startupinfo=info)
    else:
        self.popen = SafePopen(args, env=environ, stdout=output, stderr=output)
def setupServer(self, javabin, args, classpath):
    is_win = (sys.platform == 'win32')
    separator = (';' if is_win else ':')
    fileSeparator = ('\\' if is_win else '/')
    classpathset = set(classpath.split(separator))
    environ = os.environ.copy()
    if ('CLASSPATH' in environ):
        classpathset.union(environ['CLASSPATH'].split(separator))
    environ['CLASSPATH'] = separator.join(classpathset)
    if (vim.eval('get(g:, "JavaComplete_JavaviLogLevel", 0)') != 0):
        defaulttmp = ((tempfile.gettempdir() + fileSeparator) + 'javavi_log')
        logdir = vim.eval(("get(g:, 'JavaComplete_JavaviLogDirectory', '%s')" % defaulttmp))
        if (not os.path.isdir(logdir)):
            os.mkdir(logdir)
        self.logfile = open(('%s%s%s' % (logdir, fileSeparator, 'javavi_stdout.log')), 'a')
        output = self.logfile
    else:
        output = subprocess.PIPE
    args = (([javabin] + args) + ['-D', str(SERVER[1])])
    if (is_win and vim.eval('has("gui_running")')):
        info = subprocess.STARTUPINFO()
        info.dwFlags = 1
        info.wShowWindow = 0
        self.popen = SafePopen(args, env=environ, stdout=output, stderr=output, startupinfo=info)
    else:
        self.popen = SafePopen(args, env=environ, stdout=output, stderr=output)