Closed Bug 528207 Opened 16 years ago Closed 7 years ago

For envjs, load() only works from an interactive shell.

Categories

(Rhino Graveyard :: Core, defect)

x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: umbrae, Unassigned)

Details

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 Build Identifier: Rhino 1.7 release 3 PRERELEASE 2009 07 08 From an interactive rhino shell, I can run: js> load('env.rhino.js'); js> print(typeof(Envjs)); function However, when I run the same thing from within a file, I get undefined. See below: user-12ld1po:readabilityCL umbrae$ cat test.js load('env.rhino.js'); print(typeof(Envjs)); user-12ld1po:readabilityCL umbrae$ js test.js undefined Reproducible: Always Actual Results: Envjs is not loaded when I invoke a test js file from the command line. Expected Results: Envjs to be loaded properly.
I was just informed that running the jar with -opt -1 will remove a file limit that is imposed when running scripts away from the interpreter. I still think this is confusing and not well documented anywhere, so I'm going to leave this ticket open.

Closing. Bug management is now done here:
https://github.com/mozilla/rhino

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.