[384] in java-interest

home help back first fref pref prev next nref lref last post

Re: Embedding Awt items and CLASSPATH

daemon@ATHENA.MIT.EDU (Jonathan Payne)
Mon Jun 19 01:52:10 1995

Date: Sun, 18 Jun 1995 22:33:34 -0700
From: jpayne@starwave.com (Jonathan Payne)
To: peppar@cdt.luth.se
Cc: perry@OpenMarket.com, hotjava-interest@java.sun.com,
        java-interest@java.sun.com
In-Reply-To: <199506190514.HAA07797@salt.cdt.luth.se> (message from Peter Parnes on Mon, 19 Jun 1995 07:14:58 +0200)
Reply-To: jpayne@starwave.com

> jpayne@starwave.com said:
> > If you change his source code to make some stuff public, it should 
> > work.
> 
> Maybe,
> 
> > Or you can just switch to my stuff. 
> 
> Jonathan, you can get the same thing with your package :-) The problem is that you'll get Mr Perry's error if you don't make the class that uses the panel-stuff public. 
> 
> public class mocha extends AppletPanel { 
> ^^^^^^
> 
> /Peppar

This was the original error.

> java.lang.IllegalAccessException app.AppLabel.<init>
> (Lapp/AppletPanel;Ljava/lang/String;I)V
>         at app.mocha.init(mocha.java:27)
>         at browser.AppletDisplayItem.init(AppletDisplayItem.java:248)
>         at browser.AppletDisplayItem.<init>(AppletDisplayItem.java:191)
>         at browser.AppTagRef.apply(AppTagRef.java:39)
>         at browser.WRFormatter.processStyleRefs(WRFormatter.java:311)
>         at awt.Formatter.layout(Formatter.java:335)
>         at browser.WRFormatter.layout(WRFormatter.java:351)
>         at awt.TextWindow.layoutDocument(TextWindow.java:73)
>         at browser.WRWindow.validate(WRWindow.java:550)
>         at browser.WRWindow.setDocument(WRWindow.java:321)
> Failed to intialize: java.lang.IllegalAccessException: app.AppLabel.<init>
> (Lapp/AppletPanel;Ljava/lang/String;I)V

This error means that while running in app.mocha's constructor, the
constructor for app.AppLabel (or the class itself) wasn't accessible
(not public, probably).

Unfortunately, I am a little confused because he's defining class
mocha in the same package (app) as AppLabel, so it doesn't have to be
public!  At least according the the stack trace.  What's weird is his
html:

    > <APP class=mocha >
    > <APP class=app.TestPanel5 src=/xxxx/xxxx/hotjava-alpha3/hotjava/>

indicates he's looking for class "mocha" not "app.mocha".  I think
we're not getting the complete story here :-)

Or I am confused.



-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post