[jdom-interest] IllegalAccessError : how to pass Element to constructor

James Sinnamon sinnamon at usq.edu.au
Tue Feb 27 19:38:34 PST 2001


Wes,

Wesley Biggs wrote:

> How did you declare your constructor for Interactor(Element e)?  The
> IllegalAccessError may be telling you it needs to be declared "public".
>

Here's the code:

package org.multipi;
import org.jdom.Element;

public class Interactor {
 Element initState;
  public Interactor (Element initSt) {
    initState =  initSt;
  }
}// Interactor

,,, this seems correct, from what you have told me.

On the other hand, what puzzles me is the reference to
'Lorg/jdom/element/'.

Why 'Lorg' and not 'org'?  As far as I can see there
is no string 'Lorg' in any of my code.

if I run 'ant ...clean' and then 'ant ... run', the problem
goes away, but only if  ia also clone() the Element object
before passing it to the interactor constructor.

Thanks again and TIA

James

--
James Sinnamon  sinnamon at usq.edu.au

ph +61 7 46311490, +61 412 319669
PO Box 517 Darling Heights QLD 4350






More information about the jdom-interest mailing list