Thanks for that, works great. I had read it but didn't appeciate that the -J args flow on into the main script and can set vars in that script. I had read it as setting some kind of globals before you start your script.
Greg E

On 31 August 2013 19:28, Rolf Huehne <> wrote:
Am 31.08.2013 03:00, schrieb Greg Edwards:
>>  3. How to pass args into a script from the command line ?
> I meant command line args:
> java  -jar Jmol.jar  arg1  arg2=val2  etc
You can use the '-J' command-line option for this (see, e.g.:

java .jar Jmol.jar -J 'arg1="argument1"; arg2="argument2";' -s
script_file pdb_file

With '-J' you can pass any script commands to Jmol. They are executed
before the script provided with "-s script_file". So you can also
provide settings for this script.
Case is important here. Script commands provided after '-j' are executed
after the script from '-s' is executed. The order within the
command-line is not important here.



Rolf Huehne

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax:     +49 3641 65 6210

           Scientific Director: Prof. Dr. K. Lenhard Rudolph
        Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 296, Amtsgericht Jena
Tax Number: 162/141/08228

Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
Jmol-users mailing list

Greg Edwards,
Port Jackson Bioinformatics