Playing around with Rhino I found that you cannot use spaces in script
paths passed into the load(..) command - or maybe you can?
For example:

C:\>java -cp "C:\workspace\org.mozilla.javascript"
org.mozilla.javascript.tools.shell.Main -e load(\"C:\\test\\scripts\\fib.js
\")

works just fine, but this:

C:\>java -cp "C:\workspace\org.mozilla.javascript"
org.mozilla.javascript.tools.shell.Main -e load(\"C:\\test\\scripts path
space\\fib.js\")

blows up with the following exceptions reported to the console:

js: "<command>", line 1: unterminated string literal
js: load("C:\\test\\scripts
js: ......................^
js: "<command>", line 1: syntax error
js: load("C:\\test\\scripts
js: ......................^
js: Couldn't read source file "path: path (The system cannot find the file
speci
fied)".

is there a way to escape spaces in the load(..) command?

Michael Rennie
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to