[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: nptl 0.8

With nptl-0.8, the latest SUN JDK 1.4.1_01, which is available
on the web (http://java.sun.com/j2se/1.4), should work. If you 
are interested in running your favorite Java program on NPTL, 
here is a brief howto:

The java launcher checks LD_LIBRARY_PATH first to see if it 
contains the JDK library paths. It will add the necessary
path names to LD_LIBRARY_PATH if they are not already there
and exec itself. Note if you are using "elf/ld.so --library-path" 
to run NPTL, this execve() call will cause the real java 
code to be linked with default libraries (that is, LinuxThreads).

To cheat the launcher and avoid execve(), you need to set
LD_LIBRARY_PATH to the *exact* value that the java launcher
is expecting. 

Unset LD_LIBRARY_PATH, run this program first and set LD_LIBRARY_PATH 
to its output:

---------------------- PrintLibraryPath.java ------------------
public class PrintLibraryPath {
   public static void main(String[] args) {

For example, on my system:

[huanghui raq]$ java PrintLibraryPath

[huanghui raq]$ export LD_LIBRARY_PATH=/export/jdk1.4.1/jre/lib/i386/client:/export/jdk1.4.1/jre/lib/i386:/export/jdk1.4.1/jre/../lib/i386

[huanghui raq]$ elf/ld.so --library-path .:nptl:dlfcn:math:nis:nss:/export/jdk1.4.1/jre/lib/i386/client:/export/jdk1.4.1/jre/lib/i386:/export/jdk1.4.1/jre/../lib/i386 /export/jdk1.4.1/bin/java -classpath /home/huanghui/ HelloWorld
Hello World!

It's slightly simpler if your program is in a jar file as you don't
have to specify the classpath. For example:

[huanghui raq]$ elf/ld.so --library-path .:nptl:dlfcn:math:nis:nss:/export/jdk1.4.1/jre/lib/i386/client:/export/jdk1.4.1/jre/lib/i386:/export/jdk1.4.1/jre/../lib/i386 /export/jdk1.4.1/bin/java -jar /export/jdk1.4.1/demo/jfc/Notepad/Notepad.jar

this will launch the Notepad demo.

Let me know if you are having any problems.


Ulrich Drepper wrote:

> Hash: SHA1
> A quick follow-up release.  Hui Huang reported a bug in
> pthread_attr_getstack and I've now actually added some test for the user
> stack handling (which exposed a few more problems).  They should be
> fixed now.  As usual, the sources are in nptl-0.8.tar.bz2:
>   http://people.redhat.com/drepper/nptl/nptl-0.8.tar.bz2
>   ftp://people.redhat.com/drepper/nptl/nptl-0.8.tar.bz2
> And in case somebody "forgot":
> - - you need a gcc which supports TLS and the __thread keyword
> - - you need the 2.5.49 kernel or above
> https://listman.redhat.com/pipermail/phil-list/2002-November/000275.html
> contains a nice summary.
> - --
> - --------------.                        ,-.            444 Castro Street
> Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
> Red Hat         `--' drepper at redhat.com `---------------------------
> Version: GnuPG v1.0.7 (GNU/Linux)
> iD8DBQE940Oj2ijCOnn/RHQRAq2DAJoCsvySHCazv5W87fBwR7aiYrWWzACgyC6c
> sPnMhuzrd+HJN36lMXPSwSA=
> =9s7z
> --
> Phil-list mailing list
> Phil-list redhat com
> https://listman.redhat.com/mailman/listinfo/phil-list

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]