Can I run Jalview from the command line?


Jalview is free to end-users because of support from the UK's BBSRC and The Wellcome Trust

If you would like to see Jalview continue to be available then please take a few minutes to write us a support letter saying how you use Jalview in your research/teaching.

Write as a PDF including your institution's heading and send to:
support_jalview@bartongroup.org by Friday 19th October 2018.

Thank you all those who have already written such nice letters!

Yes. The Jalview Desktop has a number of command line options, but how you access them depends on the way you want to launch Jalview:

1. If you use Java Web Start to launch Jalview, then on some versions of Java Webstart you can start up Jalview with a specific file by typing:

javaws http://www.jalview.org/webstart/jalview.jnlp -open yourFileName

This is fine for launching the desktop with prepared data, but less useful for batch processing since any console output will be written to the java console.

2. If you installed the InstallAnywhere version of Jalview you can run the application binary with additional arguments. However any output from the application will be sent to a file called output.txt in the directory where you installed Jalview, rather than to the command's standardĀ output channel.

3. To use Jalview like a command line program from a terminal, we recommend you use the following command (you could also put this in a shell or batch script).

java -classpath "$INSTALL_DIR$/jalview.jar:$INSTALL_DIR$/lib/*"
jalview.bin.Jalview -open [FILE]

Where $INSTALL_DIR$ is the InstallAnywhere installation directory.

When compiling from source, use:
java -classpath "$SOURCE_DIR$/dist/*"
jalview.bin.Jalview -open [FILE]

Use -help to list the current set of arguments Jalview supports. The online documentation also includes a list of jalview command line parameters

Note: This FAQ has been updated - we no longer recommend the -Djava.ext.dirs=lib argument since it prevents Jalview from accessing some web services, and will be disabled in future versions of Java.

Question Type: