classpath
[Top][All Lists]
Advanced

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

Re: JAWT odds


From: Thomas Fitzsimmons
Subject: Re: JAWT odds
Date: Tue, 06 Sep 2005 20:50:24 -0400

Hi,

On Wed, 2005-09-07 at 02:10 +0200, Robert Schuster wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> I have some questions about the JAWT interface in Classpath.
> 
> 1) To compile the JAWT demo I had to copy the source files into the object
> folder and run make with:
> 
> make -f Makefile.jawt (from ${obj_dir}/examples)
> 
> It would be nice if the makefile would work without the need to copy the 
> sources
> over.

Yes, even better would be if the JAWT demo were built automatically
along with the other examples.  But that requires extra build machinery
that's not in place yet.

> 
> 2) Then I had troubles running the demo in the way I am used to (JDK-like). I
> would call:
> 
> jamvm -Djava.library.path=. gnu.classpath.examples.jawt.DemoJAWT
> 
> (In "." lies the libDemoJAWT.so library and my jamvm is compiled to use
> Classpath and its libraries from a user directory - so no additional arguments
> should be needed.)

Yes, I'm currently sorting this out for libgcj and java-gcj-compat.  Sun
puts libjawt.so in $JAVA_HOME/jre/lib/i386.  To ensure that libjawt.so
is found automatically, Sun's java executable prepends
$JAVA_HOME/jre/lib/i386 to LD_LIBRARY_PATH then re-exec's itself within
the new environment.

I've just added a java command to java-gcj-compat that does the same
thing only exec's gij instead of re-exec'ing itself.

java.library.path has nothing to do with LD_LIBRARY_PATH except that its
user-visible value defaults to the contents of LD_LIBRARY_PATH.  The
argument to -Djava.library.path= should be added to the dynamic library
loader's search path.

> 
> However this failed with:
> 
> address@hidden ~/tmp/cp-dev/swing-fixes/cp-obj/examples $ jamvm
> - -Djava.library.path=. gnu.classpath.examples.jawt.DemoJAWT
> java.lang.UnsatisfiedLinkError: Native library `DemoJAWT' not found (as file
> `/libDemoJAWT.so') in gnu.classpath.boot.library.path and java.library.path
>    at java.lang.Runtime.loadLibrary (Runtime.java:763)
>    at java.lang.System.loadLibrary (System.java:512)
>    at gnu.classpath.examples.jawt.DemoJAWT.<clinit> (DemoJAWT.java:30)
> 
> The only way I to run the demo was by calling:
> LD_LIBRARY_PATH=.:/home/rob/INSTALL/classpath/lib/classpath jamvm
> gnu.classpath.examples.jawt.DemoJAWT
> 
> So, now I wonder whether this is my fault because I extensively played around
> with --prefix installed software (Qt4, Classpath and JamVM) or a bug in
> Classpath (or JamVM)?
> 
> Btw: Great work with the JAWT interface. That is one really nifty feature.

Thanks!

> Btw2: It does not work with the Qt4 peers, but I think this is a known bug, 
> is it?

JAWT isn't implemented by the Qt4 peers yet.

Tom






reply via email to

[Prev in Thread] Current Thread [Next in Thread]