Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JAVA neophyte need your expert help

1 view
Skip to first unread message

joseph,leland w

unread,
Jul 10, 1996, 3:00:00 AM7/10/96
to

The following is my HTML code:

<HTML>
<HEAD>
<TITLE>Hello to Everyone!</TITLE>
</HEAD><BODY>
<P>My Java applet says:
<APPLET CODE="HelloWorldApplet.class" WIDTH=150 HEIGHT=25><APPLET>
</BODY>
</HTML>

I wrote my example JAVA code and compiled it without any errors. I then used
the "appletviewer" on it which resulted in the following errors:

ld.so.1: /usr/local/bin/java/bin/../bin/sparc/java: fatal: relocation error: symbol not found: XtStrings: referenced in /usr/local/bin/java/bin/../lib/sparc/libawt.so (/usr/local/bin/java/bin/../lib/sparc/libawt.so)
java.lang.UnsatisfiedLinkError: no awt in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java)
at java.lang.System.loadLibrary(System.java)
at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:37)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:191)
at sun.applet.AppletCopyright.<init>(AppletCopyright.java:33)
at sun.applet.AppletViewer.mainInit(AppletViewer.java:861)
at sun.applet.AppletViewer.main(AppletViewer.java:870)
java.lang.UnsatisfiedLinkError: init
at sun.awt.motif.MToolkit.<init>(MToolkit.java:41)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:191)
at sun.applet.AppletCopyright.<init>(AppletCopyright.java:33)
at sun.applet.AppletViewer.mainInit(AppletViewer.java:861)
at sun.applet.AppletViewer.main(AppletViewer.java:870)

I am at a loss as to how to proceed.

Your help would be most appreciated!

Leland Joseph

PS. I am using solaris 2.4. My JDK is ver 1_0_2.

Thomas Sorgie

unread,
Jul 11, 1996, 3:00:00 AM7/11/96
to

joseph,leland w wrote:
>
> The following is my HTML code:
>
> <HTML>
> <HEAD>
> <TITLE>Hello to Everyone!</TITLE>
> </HEAD><BODY>
> <P>My Java applet says:
> <APPLET CODE="HelloWorldApplet.class" WIDTH=150 HEIGHT=25><APPLET>
> </BODY>
> </HTML>
>

You never closed your applet tag in the HTML above - this is just a
guess but its worth a try..

edit this line to look like:

<APPLET CODE="HelloWorldApplet.class" WIDTH=150 HEIGHT=25></APPLET>

hope this helps.

tom.

Christian Barmala

unread,
Jul 16, 1996, 3:00:00 AM7/16/96
to joseph,leland w

"joseph,leland w" <lel...@cc.bellcore.com> wrote:
> I wrote my example JAVA code and compiled it without any errors.
> I then used the "appletviewer" on it which resulted in the
> following errors:
> error: symbol not found:

> java.lang.UnsatisfiedLinkError: no awt in shared library path
> at java.lang.Runtime.loadLibrary(Runtime.java)
> at java.lang.System.loadLibrary(System.java)

Just to make sure, check your classpath, your path and the
shared library path. Here is an example how to set it in
Windows 95:
C:\Java-WorkShop>type setenv.bat
PATH=C:\Java-WorkShop\JWS\INTEL-Win32\bin;%path%
SET CLASSPATH=C:\Java-WorkShop\JDK\classes;
C:\Java-WorkShop\JWS\classes;
C:\Java-WorkShop\jdbc\classes;.

Christian Barmala
mailto:chr...@informix.com

Duane Morin

unread,
Jul 16, 1996, 3:00:00 AM7/16/96
to

I didn't see the original message, but I'm running Sun's Java Workshop
dev 5 under Solaris and I was told that this message is a bug that
will be corrected in dev 6, and that no workaround is available.

(Note - the bug in my case actually occurred when trying to run
standalone java code from the command line. But that "no awt in
shared library path" message is the same.)

Duane

John Leveille

unread,
Jul 17, 1996, 3:00:00 AM7/17/96
to Duane Morin

I am running the JDK under Linux at home and I got the same messages
when I tried to run a stand-alone java program. I was able to fix
the problem. I don't know how it is on your systems, but I went to
the java/bin directory and found that all the executables were actually
script wrappers pointing to the java virtual machine. Each script
wrapper just invoked using a different setup. Anyways, since it
was just a script I went in and found the shared library path variable
and echoed it to the shell just before invocation of the virtual
machine.
This showed me that, in fact, the shared library path variable was
blank. I remedied this by simply inserting a line in the script which
appended my shared library path to the variable which was previously
blank. Now I get no messages about something missing from the shared
library path. :-)

John
--
John P. Leveille E-MAIL: sas...@unx.sas.com
Web Tools MA-BELL: (919) 677-8000 x7025
SAS Institute Cary, NC

Nature and nature's laws lay hid by night
God said "let Newton be" and all was light. -- Alexander Pope

0 new messages