ftp://lagrange.la.asu.edu/pub/Linux_jdk/JDK-1.1.5/
And I tried to run it under RedHat 5.0. Java complained that libawt.so
could not resolve _XsetLocale. After some Usenet searching I found that
_XsetLocale should be defined in libX11.so, but running nm against RedHat's
libX11.so revealed no such function.
So, as an experiment, I downloaded the XFree86 binaries (glibc2 version)
from www.xfree86.org. The libX11.so that I got with the binaries included
_XsetLocale. I copied the new libX11.so into my X11 lib directory and JDK115
now appears to be working just fine.
I don't know very much about XFree86, so maybe somebody could
enlighten me: why would RedHat build it without _XsetLocale?
- Dave
Just to share with u my experience. I installed RedHat 5.0 and installed
JDK 1.1.5 on XF86_VGA16 X server. All works fine except 'appletviewer'.
The error message is as below :
[root@main untitled2]# appletviewer Applet1.html
/usr/local/jdk1.1.5//lib/Linux/green_threads/libawt.so: undefined symbol: xmDrawingAreaWidgetClass (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
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:402)
at sun.applet.AppletCopyright.<init>(AppletCopyright.java:36)
at sun.applet.AppletViewer.mainInit(AppletViewer.java:1030)
at sun.applet.AppletViewer.main(AppletViewer.java:1039)
When I do ldd to libawt_g.so and libawt.so, it reveals this :
[emtan@main green_threads]$ ldd libawt.so
libXm.so.2.0 => not found
libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40050000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40093000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x4012a000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40137000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40142000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x4014a000)
libc.so.6 => /lib/libc.so.6 (0x40160000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
[emtan@main green_threads]$ ldd libawt_g.so
libXm.so.2.0 => not found
libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40050000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40093000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x4012a000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40137000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40142000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x4014a000)
libc.so.6 => /lib/libc.so.6 (0x40160000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
The issue is why it can't find libXm.so.2.0 though I have already issue :
ln -s /usr/lib/libtiff.so.3.4 /usr/local/jdk1.1.5/lib/Linux/green_threads/libXm.so.2.0
(I am using Lesstif; a Motif clone) ?
Any idea why ?
Regards.
Dave Johnson (joh...@NOSPAM.roguewave.com) wrote:
: I downloaded the latest Java JDK (1.1.5) from:
t> The issue is why it can't find libXm.so.2.0 though I have
t> already issue : ln -s /usr/lib/libtiff.so.3.4
t> /usr/local/jdk1.1.5/lib/Linux/green_threads/libXm.so.2.0 (I
t> am using Lesstif; a Motif clone) ?
Are you sure libtiff.so.3.4 is Lesstiff ? Lesstiff libraries if I
remember, are named libXm.so.0.76 etc.
Try finding statically linked awt.
-Arun
> Tan E Ming wrote:
> > The issue is why it can't find libXm.so.2.0 though I have already issue :
> > ln -s /usr/lib/libtiff.so.3.4 /usr/local/jdk1.1.5/lib/Linux/green_threads/libXm.so.2.0
> > (I am using Lesstif; a Motif clone) ?
>
> Make sure that the /usr/local/jdk1.1.5/lib/Linux/green_threads is in
> your LD_LIBRARY_PATH when using ldd.
>
> Also, try running nm on the Lesstif binary, and see if it contains the
> symbol you need. That could be the problem.
>
I have the same problem using the Glibc2 static version of 1.1.5 and I don't have Lesstif
installed.
I'm also running RedHat 5.0, and this whole glibc2 difference is driving me nuts!
> > Dave Johnson (joh...@NOSPAM.roguewave.com) wrote:
> > : And I tried to run it under RedHat 5.0. Java complained that libawt.so
> > : could not resolve _XsetLocale. After some Usenet searching I found that
> > : _XsetLocale should be defined in libX11.so, but running nm against RedHat's
> > : libX11.so revealed no such function.
> >
> > : I don't know very much about XFree86, so maybe somebody could
> > : enlighten me: why would RedHat build it without _XsetLocale?
>
> Before the libc stuff had good locale support, the X11 libs provided
> their own (_Xsetlocale) and #defined setlocale to use their stuff. Now
> that glibc (all hail the library!) has a working setlocale() of its own,
> the X libraries are built to not have _Xsetlocale in them.
> Unfortunately, libraries and binaries that were built to work with the
> older-style -DX_LOCALE stuff, so they still expect to find the
> _Xsetlocale symbols. Recompiling the world should solve that. (That
> the XFree86/glibc2 libs are built _with_ _Xsetlocale is odd, though it
> seems handy.)
Heh, I wish I understood half of what you were saying :)
I tried setting my LD_LIBRARY_PATH with no luck. Is there some other way I can force the
_Xsetlocale issue?
Thanks,
Mark Mealman