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

Error Messages using appletviewer

14 views
Skip to first unread message

Sajid Mohammed

unread,
Sep 10, 1996, 3:00:00 AM9/10/96
to

Hi all,
I got hold of HelloWorld applet tried working on it. The compilation
was successful, but executing using appletviewer gave
me the following result:

ld.so.1: /home/lbs/smohamme/data/java/bin/../bin/sparc/java: fatal:
relocation error: symbol not found: XtStrings: referenced in
/home/lbs/smohamme/data/java/bin/../lib/sparc/libawt.so
(/home/lbs/smohamme/data/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)

Can somebody help me as to what I should do to rectify it.
I am working in Solaris 2.0 environment.
CLASSPATH refers to current directory and
/home/lbs/smohamme/data/java/lib.

Details:
---------
HelloWorld.java:
----------------
import java.applet.Applet;
import java.awt.Graphics;

public class HelloWorld extends Applet {
public void paint (Graphics g){
g.drawString("Hello World of Applets!!",50, 25);
}
}

HelloWorld.html:
----------------
<HTML>
<HEAD>
<TITLE> The First Applet program </TITLE>
</HEAD>

<BODY>
This is the output of my program.....
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>

Command:
--------
appletviewer HelloWorld.html

Thanks for your help,
Sajid.
E-Mail: mohamme...@jpmorgan.com

Peter Sumner

unread,
Sep 12, 1996, 3:00:00 AM9/12/96
to

You need to set your LD_LIBRARYPATH environment variable so that it loads
the java/lib/sparc files before the standard motif or openwindows
libraries.

--
Peter Sumner

0 new messages