jakarta-bsf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulf Dittmer <...@ulfdittmer.com>
Subject Re: general questions
Date Sun, 31 Oct 2004 13:34:13 GMT
You need to use the syntax "new Packages.org.jdom.input.SAXBuilder()" 
instead. The ScriptingJava.html page of the Rhino documentation 
explains why. Only the java.* hierarchy can be accessed w/o the 
"Packages." prefix. All classes in your classpath should be accessible 
in this way.


On 31.10.2004, at 02:02, Rainer Hahnekamp wrote:

> Hi,
> thank you very much for your quick answer.
> Unfortunately I think, that you misunderstood me a little bit. So let 
> me try
> to explain my problem in more detail with following example:
> I want to make use of the jdom-library in my script code. So the first 
> row of
> the javascript-code would be:
> sax = new org.jdom.input.SAXBuilder();
> By executing this code I get the error message: 
> "org.apache.bsf.BSFException:
> JavaScript Error: Internal Error: undefined: "org" is not defined."
> I assume that I can only access the standard java api as you did in 
> your
> mentioned example scripedui with the AWT Objects. But if I want to use 
> some
> functionality of an external library I have to do the 
> instantiate&register
> process, which would be - in my case (OpenOffice API & jdom) - an 
> impossible
> work.
> Greetings,
> -Rainer Hahnekamp

To unsubscribe, e-mail: bsf-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-user-help@jakarta.apache.org

View raw message