OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Can't subclass ElementNode in applet

[ Lists Home | Date Index | Thread Index ]
  • From: David Brownell <david-b@pacbell.net>
  • To: xml-dev@ic.ac.uk
  • Date: Sun, 09 May 1999 16:59:17 -0700

"Rajiv Mordani [CONTRACTOR]" wrote:
> Hi Steve,
>         This error occurs when you use jdk1.1.x. Try using jdk1.2. This
> problem doesn't occur with jdk1.2. 

Or to be more specific:  don't use the JDK 1.1.x "javac" (or ones that
work like it), just use the JDK 1.2 one (or ones that have that bug
fixed).  The compiler was generating bad code for accessing interface
memebers, ergo "illegal access" ... the correct code runs on JDK 1.1
virtual machines.

Re why that class isn't public ... it didn't need to be, and it exposes
various internals that were not intended to be supported.  In fact, you
couldn't subclass it outside of that package anyway.

- Dave

>	If you have any more problems please do
> let me know.
> - Rajiv
> >
> > I've got an application which subclasses ElementNode with, for example, a
> > class com.artemisalliance.xml.ModelNode.  ModelNode implements some methods
> > which wrap various features of the Node interface.
> >
> > This works fine when I have the com.sun.xml package exploded into my class
> > path for the IDE, but if I try to run it with the package in the jar,
> > either in the ide or in a browser, I get an IllegalAccessError:
> >
> > java.lang.IllegalAccessError: try to access class
> > com/sun/xml/tree/ParentNode from class com/artemisalliance/xml/client/ModelNode
> >
> > I've got three questions:
> >
> > 1) Why is ParentNode not a public class?
> >
> > 2) Why does the JVM throw this only when the package is jar'd?
> >
> > 3) Any ideas what I can do about this?  It would be very inconvenient not
> > to be able to subclass ElementNode.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS