[379] in java-interest
Embedding Awt items and CLASSPATH
daemon@ATHENA.MIT.EDU (Jeffrey Perry)
Sun Jun 18 20:34:53 1995
To: hotjava-interest@java.sun.com
Cc: java-interest@java.sun.com, perry@OpenMarket.com
Date: Sun, 18 Jun 1995 20:14:14 -0400
From: Jeffrey Perry <perry@OpenMarket.com>
Could someone please clarify how to use AVH's embedded UI components?
(Yes I know Jonathon Payne at Starwave has some newer better ways to do
this but I want to start with the earlier way)
I obtained embedding.tar and did a tar -xvf into my hotjava classes
directory. /xxxx/xxx/hotjava-alpha3/hotjava which put the files in
/xxxxx/xxxx/hotjava-alpha3/hotjava/classes/app
I have suceeded at embedding TestPanel5 into an HTML page.
I can not, however, use the same code inside an Applet I am developing.
CLASSPATH is not set when I run HotJava and is only set when I am compiling
to be /xxxx/xxx/hotjava-alpha-3/hotjava/mydev. I place all my java source
in the directory mydev and periodically move it to the subdirectory under
mydev called classes for testing. I try to invoke the exact code from
TestPanel5
inside my init routine and get the following error: (from hotjava's log)
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
Line 27 of mocha.java is:
panel.add(new AppLabel(this, "Street:", AppLabel.RIGHT), 5, 30, 50, 20);
The file test.html in the mydev directory contains the following two lines:
<APP class=mocha >
<APP class=app.TestPanel5 src=/xxxx/xxxx/hotjava-alpha3/hotjava/>
Could someone please help me figure out this classpath stuff and how to setup
my development environment? I am not using CLASSPATH except to compile
right now. Perhaps the explaination sent back to me could also be added
to the documentation somewhere.
Thanks!
Jeffrey Perry
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com