Appendix A. Command Line Usage

When jEdit is started, it opens any files specified on the command line, and parses any specified the options. An option is a command line argument that begins with "-". If you actually want to open a file whose name begins with "-", specify "- -" on the command line before the file name. The "- -" switch makes jEdit ignore any remaining command line switches and interpret them as file names.

If a file name contains the hash ("#") character, the remainder of the file name after the hash will be the name of the marker to move the caret to. If the first character of the marker name is a plus sign ("+") the remainder is treated as a line number to move the caret to. For example:

$ jedit thesis.tex#chapter5
$ jedit MyApplet.java#+10

Table A-1. Table of command line switches

SwitchEffect
-backgroundRuns jEdit in background mode. In background mode, an initial view will not be created; instead, jEdit will wait for client connections. Also, in background mode, closing all views will not exit jEdit. To exit a backgrounded instance, you must invoke File>Exit.
-guiNormally, when run in background mode, jEdit will not create the initial view. This switch will force one to be created.
-noserverDisables the edit server. Does not attempt to connect to the server, and does not start one either. Can be used to force another instance of jEdit to start if one is already running.
-nosessionjEdit will not attempt to load a saved session. Session saving can be disabled permanently in the Utilities>Global Options dialog box; see the section called The Global Options Dialog Box in Chapter 8. Has no effect when connecting to another instance via the edit server.
-nosettingsStarts jEdit without loading user-specific settings. This can be used if they are corrupt for some reason, or if a plugin installed in your plugins directory is causing problems. Has no effect when connecting to another instance via the edit server.
-nosplashStarts jEdit without displaying the splash screen. This has several uses; first of all, if you start jEdit from your .xinitrc or whatever on Unix, it might be undesirable for the splash screen to appear every time you log in. Another reason this might be used is if you want jEdit to start slightly faster (not much faster; about half a second). Has no effect when connecting to another instance via the edit server.
-readonlyOpens all files specified on the command line read only.
-reuseviewOnly valid when connecting to another instance. When this switch is specified, instead of creating a new view, jEdit will open the files in the first existing view.
-server=nameStores the server port info in the file named name, rather than the default server (file names for this parameter are relative to the settings directory, $HOME/.jedit by default). Can be used to start more than one instance of jEdit.
-session=nameLoads a previously-saved session from user.home/.jedit/sessions/name. Sessions can be saved with the Utilities>Save Session command; see the section called Saving and Loading Sessions in Chapter 4 for details.
-settings=dirLoads and saves the user-specific settings from the directory named dir, instead of the default user.home/.jedit. dir will be created if it does not exist. Has no effect when connecting to another instance via the edit server.
-usagePrints a brief command line usage message and exits. This is also shown if an invalid switch was specified.
-versionPrints the jEdit version number and exists.
- -Specifies the end of the command line switches. Further parameters are treated as file names, even if they begin with a dash. Can be used to open files whose names start with a dash, and so on.