SplashScreen splash = null;
	public static void main(String[] args)	{		// Parse command line		boolean endOpts = false;		boolean readOnly = false;		String userHome = System.getProperty("user.home");		String userDir = System.getProperty("user.dir");		usrProps = userHome + File.separator + ".jedit-props";		historyFile = userHome + File.separator + ".jedit-history";		portFile = userHome + File.separator + ".jedit-server";		boolean desktop = true;		boolean showSplash = true;		int lineNo = -1;				for(int i = 0; i < args.length; i++)		{			String arg = args[i];			if(arg.startsWith("-") && !endOpts)			{				if(arg.equals("--"))					endOpts = true;				else if(arg.equals("-usage"))				{					version();					System.err.println();					usage();					System.exit(1);				}				else if(arg.equals("-version"))				{					version();					System.exit(1);				}				else if(arg.equals("-nousrprops"))					usrProps = null;				else if(arg.equals("-nohistory"))					historyFile = null;				else if(arg.equals("-noserver"))					portFile = null;				else if(arg.equals("-nodesktop"))					desktop = false;				else if(arg.equals("-nosplash"))					showSplash = false;				else if(arg.startsWith("-usrprops="))					usrProps = arg.substring(10);				else if(arg.startsWith("-history="))					historyFile = arg.substring(9);				else if(arg.startsWith("-portfile="))					portFile = arg.substring(10);				else if(arg.equals("-readonly"))					readOnly = true;				else if(arg.startsWith("-+"))				{					try					{						lineNo = Integer.parseInt(arg							.substring(2));					}					catch(NumberFormatException nf)					{					}				}				else				{					System.err.println("Unknown option: "						+ arg);					usage();					System.exit(1);				}				args[i] = null;			}		}		// Try to connect to the server		if(portFile != null && new File(portFile).exists())		{			try			{				BufferedReader in = new BufferedReader(					new FileReader(portFile));				Socket socket = new Socket("localhost",					Integer.parseInt(in.readLine()));				DataOutputStream out = new DataOutputStream(					socket.getOutputStream());				out.writeBytes(in.readLine());				out.write('\n');				if(readOnly)					out.writeBytes("-readonly\n");				out.writeBytes("-cwd=" + userDir + "\n");				if(lineNo != -1)					out.writeBytes("-+" + lineNo + "\n");				boolean opened = false;				for(int i = 0; i < args.length; i++)				{					if(args[i] == null)						continue;					out.writeBytes(args[i]);					out.write('\n');					opened = true;				}				if(!opened)					out.write('\n');				socket.close();				in.close();				return;			}			catch(Exception e)			{				System.out.println("jEdit: connection to server failed");			}		}		// Ok, server isn't running; start jEdit		// Show the kool splash screen		SplashScreen splash = null;		if(showSplash)			splash = new SplashScreen();		// Get things rolling		initMisc();		initSystemProperties();		initModes();		initActions();		initOptions();		initPlugins();		initUserProperties();		initPLAF();		propertiesChanged();		initRecent();		if(historyFile != null)			HistoryModel.loadHistory(historyFile);		// Start plugins		JARClassLoader.initPlugins();		// Load files specified on the command line		Buffer buffer = null;		for(int i = 0; i < args.length; i++)		{			if(args[i] == null)				continue;			buffer = openFile(null,userDir,args[i],readOnly,false);			if(lineNo != -1)			{				Element lineElement = buffer.getDefaultRootElement()					.getElement(lineNo - 1);				if(lineElement != null)				{					buffer.setCaretInfo(lineElement.getStartOffset(),						lineElement.getStartOffset());				}			}		}		if(buffer == null)		{			if("on".equals(getProperty("saveDesktop")) && desktop)				buffer = loadDesktop();		}		if(buffer == null)			buffer = newFile(null);		// Create the view		newView(null,buffer);		// Dispose of the splash screen		if(splash != null)			splash.dispose();	}