System.exit(1);
	public static void main(String[] args)	{		// Parse command line		boolean endOpts = false;		boolean readOnly = false;		boolean wait = false;		settingsDirectory = System.getProperty("user.home") +			File.separator + ".jedit";		serverPath = "org.gjt.sp.jedit/RemoteEditor/"			+ System.getProperty("user.name");		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("-nosettings"))					settingsDirectory = null;				else if(arg.startsWith("-settings="))					settingsDirectory = arg.substring(10);				else if(arg.equals("-rmi"))				{					if(serverPath != null)						serverPath = "org.gjt.sp.jedit/RemoteEditor/" +						System.getProperty("user.name");				}				else if(arg.startsWith("-rmi="))					serverPath = arg.substring(5);				else if(arg.equals("-normi"))					serverPath = null;				else if(arg.equals("-wait"))					wait = true;				else if(arg.equals("-nodesktop"))					desktop = false;				else if(arg.equals("-nosplash"))					showSplash = false;				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;			}		}		String userDir = System.getProperty("user.dir");		// Try to connect to the RMI server		if(serverPath != null)		{			try			{				RemoteEditor editor = (RemoteEditor)Naming					.lookup(serverPath);				RemoteBuffer buf = null;				for(int i = 0; i < args.length; i++)				{					String file = args[i];					if(file == null)						continue;					buf = editor.openFile(null,userDir,file,						readOnly,false);				}				if(buf == null)					buf = editor.newFile(null);				RemoteView view = editor.newView(null,buf);				if(lineNo != -1)				{					int pos = buf.getLineStartOffset(lineNo);					if(pos != -1)						view.setCaretPosition(pos);				}				if(wait)					editor.waitForClose(view);				// Clean up				editor = null;				buf = null;				System.runFinalization();				System.gc();				return;			}			catch(java.rmi.ConnectException c)			{			}			catch(NotBoundException nb)			{			}			catch(Exception e)			{				System.err.println("Error while contacting jEdit RMI"					+ " service:");				e.printStackTrace();				System.exit(1);			}		}		// Show the kool splash screen		if(showSplash)			GUIUtilities.showSplashScreen();		// Get things rolling		initMisc();		initSystemProperties();		initModes();		initActions();		initOptions();		initPlugins();		initUserProperties();		initPLAF();		propertiesChanged();		initRecent();		if(settingsDirectory != null)		{			HistoryModel.loadHistory(settingsDirectory + File.separator				+ "history");		}		SearchAndReplace.load();		// 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);		// Start the RMI service last, to prevent races		initRMI();		// Create the view		newView(null,buffer);		// Dispose of the splash screen		GUIUtilities.hideSplashScreen();	}