Command Line Usage

On operating systems that support a command line, jEdit can be passed various arguments to control its behavior.

When opening files from the command line, a line number or marker to position the caret on can be specified like so:

$ jedit MyApplet.java +line:10
$ jedit thesis.tex +marker:c

Command-line switches begin with a "-". Some take a parameter. A file whose name begins with "-" can be opened like so:

$ jedit -- -myfile

Miscellaneous Options

OptionEffect
-log=levelSet the minimum log level to an integer between 1 and 9. Default is 7. Has no effect when connecting to another instance via the edit server.
-usageShow a brief command line usage message without starting jEdit. This message is also shown if an invalid switch was specified.
-versionShow the version number without starting jEdit.
--Specifies the end of command-line processing. Further parameters are treated as file names, even if they begin with a dash.

Configuration Options

OptionEffect
-pluginsEnable loading of plugins. Has no effect when connecting to another instance via the edit server. See Chapter 9, Installing and Using Plugins.
-nopluginsDisable loading of plugins. Has no effect when connecting to another instance via the edit server.
-restoreRestore previously open files on startup. This is the default. This feature can also be set permanently in the General pane of the Utilities>Global Options dialog box; see the section called “The General Pane”.
-norestoreDo not restore previously open files on startup.
-run=scriptRun the specified BeanShell script. There can only be one of these parameters on the command line. See the section called “Running Scripts from the Command Line”.
-settings=dirStore user-specific settings in the directory named dir, instead of the default user.home/.jedit. The directory will be created automatically if it does not exist. Has no effect when connecting to another instance via the edit server. See the section called “The jEdit Settings Directory”.
-nosettingsStart jEdit without loading user-specific settings.
-startupscriptsRun startup scripts. This is the default. Has no effect when connecting to another instance via the edit server. See the section called “Startup Scripts”.
-nostartupscriptsDisable startup scripts. Has no effect when connecting to another instance via the edit server.

Edit Server Options

See Chapter 2, Starting jEdit for a brief description of the edit server.

OptionEffect
-backgroundRun jEdit in background mode. In background mode, the edit server will continue listening for client connections even after all views are closed. Has no effect when connecting to another instance via the edit server.
-nobackgroundDisable background mode. This is the default. Has no effect when connecting to another instance via the edit server.
-guiOpen an initial view. This is the default. Has no effect when connecting to another instance via the edit server.
-noguiDo not open an initial view, and instead only open one when the first client connects. Can only be used in combination with the -background switch. You can use this switch to “pre-load” jEdit when you log in to your computer, for example. Has no effect when connecting to another instance via the edit server.
-newplainviewOpens the specified files in a new plain view. For more information about views, see the section called “Multiple Views”.
-newviewOpens the specified files in a new view.
-reuseviewOpens the specified files in an existing view.
-quitExits the currently running editor instance.
-serverStore the server port info in the file named server inside the settings directory.
-server=nameStore the server port info in the file named name. File names for this parameter are relative to the settings directory.
-noserverDo not attempt to connect to a running edit server, and do not start one either.
-waitKeeps the client open until the user closes the specified buffer in the server instance. Does nothing if passed to the initial jEdit instance. Use this switch if jEdit is being invoked by another program as an external editor; otherwise the client will exit immediately and the invoking program will assume you have finished editing the given file.