On 11/12/2009 9:11 PM, Deepak Agarwal wrote:
importPackage(oracle.tip.pc.services.translation.framework);
...
javax.script.ScriptException:
sun.org.mozilla.javascript.internal.EcmaError: ReferenceError:
"oracle" is not defined. (<Unknown source>#3) in<Unknown source> at
line number 3
...
I have successfully imported the package java.io using
importPackage(java.io);
Can somebody tell me the correct syntax to import packages starting
from other then java or javax?
In general you need to prefix the package name (or class name, for
importClass) with "Packages.":
importPackage(Packages.oracle.ip.pc.services.translation.framework);
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino