I am using the Rhino JavaScript engine v1.7R1 and would like to use
the Rhino Shell to execute a script that uses components from
JavaMail.  I have placed the mail.jar and activation.jar files in the
same location as the js.jar file.  When I execute the script (see
below) using the Rhino Shell (java -jar js.jar emailtest.js) I receive
the following error:
>> js: uncaught JavaScript runtime exception: TypeError: [JavaPackage 
>> javax.mail.internet.InternetAddress] is not a function, it is object.  The 
>> emailtest.js script is as follows:
>> importPackage(javax.mail);
>> importPackage(javax.mail.internet);
>>
>> var address = new 
>> Packages.javax.mail.internet.InternetAddress("[email protected]", "Test 
>> User");

Can someone please point me in the right direction?

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

Reply via email to