rhino: -e option doesn't work correctly

TANAKA Satoshi tanaka1999 at gmail.com
Tue Oct 28 02:18:36 UTC 2008

Package: rhino
Version: 1.6.R7-2
Severity: minor

-e option works correctly, if there is no space in a script string.

$ rhino -e 'print("1");print("2");'

If thire are spaces, thie first splited word is interpreted as a script,
the rest is interpreted as script filenames.

$ rhino -e 'print("1"); print("2");'
js: Couldn't open file "print("2");".


$ cat /usr/bin/rhino

/usr/bin/java -jar /usr/share/java/js.jar $@

$@ is not quoted. 

/usr/bin/java -jar /usr/share/java/js.jar "$@"

is correct.
For pathnames that include "space" like offen in Mac OS X,
this shell script's parameter expantion is better.

-- System Information:
Debian Release: lenny/sid
  APT prefers hardy-updates
  APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy-backports'), (500, 'hardy')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-19-generic (SMP w/2 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to ja_JP.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rhino depends on:
ii  sun-java5-jre [java2-r 1.5.0-15-0ubuntu1 Sun Java(TM) Runtime Environment (
ii  sun-java6-jre [java2-r 6-07-3ubuntu2     Sun Java(TM) Runtime Environment (

rhino recommends no packages.

-- debconf-show failed

More information about the ubuntu-users mailing list