SwingUtilities.invokeLater(new NewInstRunner(fileName, useStdin));
SwingUtilities.invokeLater(new NewInstRunner(fileName, useStdin, adminMode));
    public static void main(String[] args) {        // parse command line        String fileName = "";        boolean useStdin = false;                for (int i = 0; i < args.length; i++) {            if (args[i].startsWith("--")) { // command line argument                if (args[i].equals("--stdin"))                    useStdin = true;                else                    System.err.println(utils._("Unknown command line argument: ") + args[i]);            } else if (args[i].startsWith("-"))                System.err.println(utils._("Unknown command line argument: ") + args[i]);            else // treat argument as file name to send                fileName = args[i];        }                Socket oldinst = checkLock();                if (oldinst == null) {            SwingUtilities.invokeLater(new NewInstRunner(fileName, useStdin));            blockThread = new SockBlockAcceptor();            blockThread.start();        } else {                        try {                if (useStdin) {                     BufferedOutputStream bufOut = new BufferedOutputStream(oldinst.getOutputStream());                    BufferedInputStream bufIn = new BufferedInputStream(System.in);                    bufOut.write(codeSubmitStream);                    byte[] buf = new byte[16000];                    int bytesRead = 0;                    do {                        bytesRead = bufIn.read(buf);                        if (bytesRead > 0)                            bufOut.write(buf, 0, bytesRead);                    } while (bytesRead >= 0);                    bufIn.close();                    bufOut.close();                                } else if ( fileName.length() > 0) {                    OutputStream outStream = oldinst.getOutputStream();                    outStream.write(codeSubmitFile);                    BufferedWriter bufOut = new BufferedWriter(new OutputStreamWriter(outStream));                    File f = new File(fileName);                    bufOut.write(f.getAbsolutePath() + "\n");                    bufOut.close();                } else {                    System.err.println(utils._("There already is a running instance!"));                    System.exit(1);                }                       oldinst.close();            } catch (IOException e) {                System.err.println("An error occured communicating with the old instance: " + e.getMessage());            }        }    }