Command Line Options

jGnash has several command line options for advanced users.

Options

-enableEDT

Primarily used for development and debugging the graphical user interface. When enabled, this detects and warns of bad UI programing practice.

-file filename

Specifies a file to load at startup.

-opengl

Enables OpenGL support for platforms and video drivers that support it. Disable use if strange graphics errors occur.

-portable

If portable is specified on the command line, jGnash preferences will be stored to a file name pref.xmlinstead of using the system registry. Use of this option is intended for users who want to run jGnash from a thumb drive on multiple computers and maintain their preferences without using the system registry. The pref.xml file will usually be stored at the location jGnash was started from.

-portableFile filename

If you don't like the location the pref.xml file is stored, or wish to use a different name, use this option to change location and name to suit.

-uninstall

Removes all registry and configuration settings jGnash has created. This will not have any effect if you have been using the -portable option.

Client/Server Options

-server filename

Starts the jGnash server using the specified file. The file must exist and not be in use by another program. A user interface will not be displayed. The file must be in the Object Database (jdb) format.

-client servername

Starts jGnash and automatically connects to the specified server. If running on the same computer as the server, localhost may be used as the name of the server.

-user name

The user name that the client must correctly specify to connect to the jGnash server.

-password password

The password that the client must correctly specify to connect to the jGnash server.

-port port

An empty port for network communications. The specified port and port + 1 may not be used by another application at the same time. The default port is 5300.

[Tip]Open Dialog

It is possible to start the jGnash client and specify the server, user, and password settings from the FileOpen dialog.

Client/Server Examples

Start the jGnash server using the default port

java -jar jGnash2.jar -server
                /home/craig/jgnash.jdb
                -user
                craig
                -passwordfh56dy
            

Start the jGnash client and connect to the local server

java -jar jGnash2.jar -client
                localhost
                -user
                craig
                -passwordfh56dy