How to supress opening any files on startup?

Per The Jalview Executable’s Command Line Arguments, I see the -open startup option allows me to Specify the alignment file to open or process by providing additional arguments, thereby overriding the default example files that are loaded on startup. However, I do not see how to launch Jalview without opening any file at all.

I tried -open "\path\to\non-existent\file" but this creates a display whose sequence is “\path\to\non-existent\file”

I tried -open "" but this raises:

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt( at jalview.bin.ArgsParser.<init>( at jalview.bin.Jalview.doMain( at jalview.bin.Jalview.main(

Might this issue be a variation of: Unwanted opening of the example file at start up on a 64-bit install ?

I now see that my need may be accomplished by un-checking Preferences > Visual > Open File.

I’d still like to control this from the command line, if possible.

Adjusting Jalview’s preferences to disable the startup file is the first exercise in our introductory jalview training courses ! See

For Jalview you can just specify a properties file containing your desired user preferences configuration - what I’d suggest is first configure Jalview as you need it, then make a copy of the .jalview_properties file (should be in the top level of your user’s home directory) and pass it in via -props

Jalview 2.11.3 has a completely new CLI system - it should allow the startup file preference to be ignored, but @ben_soares can provide clarification there.

I’m presuming, however, you’d like to launch jalview with the -groovy argument to pass in a groovy script. Ideally, jalview ought to ignore the startup file when an argument like that is passed in… I think we can perhaps raise that as an enhancement and squeeze in a patch before the next release.

You could also insert this additional line in the server groovy script:

// close all windows

// start listening for commands
new groovy.ui.GroovySocketServer(
    new GroovyShell(
        new Binding(['process':process])), 


For the upcoming release of Jalview, as part of a completely revamped command line argument interface, I’ve added a

jalview --nostartupfile

argument which will prevent the startup file from showing just for that session.
Look out for Jalview 2.11.3!

1 Like