title: Running Jython script from terminal with parameter
body: <p>I want to invoke Jython scripts from command line, p.e.
  <code>$ /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --headless little_jython_script.py</code></p>
  
  <p>I know about Python's (and therefore Jython's) capability to take parameters by</p>
  
  <pre><code>import sys
  params = sys.argv[1:]
  </code></pre>
  
  <p>and then calling the script with something like
  <code>$ /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --headless jython_script_with_params.py param1 param2 param3</code>.</p>
  
  <p>However, according to to the ImageJ webpage <a href="http://imagej.net/Script_parameters" rel="nofollow noreferrer">http://imagej.net/Script_parameters</a> it is also possible to code the use of parameters in Jython similar to the Greeting.py example from that website</p>
  
  <pre><code># @String name
  
  # A Jython script with parameters.
  # It is the duty of the scripting framework to harvest
  # the 'name' parameter from the user, and then display
  # the 'greeting' output parameter, based on its type.
  
  print "Hello, " + name + "!" 
  </code></pre>
  
  <p>The questions is: How do I specify the parameter <code>name</code> in a command line call <code>$/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --headless Helloworld.py</code> ?</p>