We have installed Linux 2.0.29 and Java 1.1. We can run class files that
do not access the AWT but when we try even simple AWT code we get the
error listed below. We have used ldconfig on the directory
/usr/local/java/lib/i586, but the problem persists. The file
/usr/local/java/lib/i586/libawt.so exists and is not a link.
We are new to Linux (we know Java), can someone help?
[root@sc java]# java Hello
File not found (/usr/local/java/bin/../lib/i586/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:199)
at java.awt.Window.getToolkit(Window.java:163)
at java.awt.Frame.addNotify(Frame.java:90)
at java.awt.Window.show(Window.java:114)
at Hello.main(Hello.java:55)
java.lang.UnsatisfiedLinkError: init
at sun.awt.motif.MToolkit.<init>(MToolkit.java:41)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:199)
at java.awt.Window.getToolkit(Window.java:163)
at java.awt.Frame.addNotify(Frame.java:90)
at java.awt.Window.show(Window.java:114)
at Hello.main(Hello.java:55)
--
David Boydston
Solutions Consulting
dhboy wrote:
>
> Greetings,
>
> We have installed Linux 2.0.29 and Java 1.1. We can run class files that
> do not access the AWT but when we try even simple AWT code we get the
> error listed below. We have used ldconfig on the directory
> /usr/local/java/lib/i586, but the problem persists. The file
> /usr/local/java/lib/i586/libawt.so exists and is not a link.
> David Boydston
> Solutions Consulting
--
Nicholas Sydenham <nsyd...@dra.hmg.gb>
DERA Malvern
Subtlety is the art of saying what you think...
and getting out of the way before it is understood.
>We have installed Linux 2.0.29 and Java 1.1. We can run class files that
>do not access the AWT but when we try even simple AWT code we get the
>error listed below. We have used ldconfig on the directory
>/usr/local/java/lib/i586, but the problem persists. The file
>/usr/local/java/lib/i586/libawt.so exists and is not a link.
I don't know if this is relevant,
but you can set the environment variable LD_LIBRARY_PATH
(in Unix generally).
--
Timothy Murphy
e-mail: t...@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Solution:
add '/usr/local/java/lib/i586' to /etc/ld.so.conf and run 'ldconfig'
--
Manuel J. Galan