Re: Clearsilver on Mac OS X

Matthew Hixson <[email protected]>
Newsgroups gmane.text.clearsilver.general
Message-ID <[email protected]>
I was able to build libclearsilver-jni.so, but I can't seem to get it  
to load under Tomcat.  The README for ClearSilver says:

"You must put the native library into a standard library location
(i.e. like /lib), or make sure that Java can find it by using
the java command line directive:

   -Djava.library.path=/somewhere/else

Then you must put the clearsilver.jar file into your java
CLASSPATH."

I have a servlet context listener that starts as soon as my webapp  
initializes and I'm printing the system properties java.library.path  
and java.class.path.

java.library.path = .:/Users/mhixson/Library/Java/Extensions:/Library/ 
Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

java.class.path = /usr/local/tomcat/bin/bootstrap.jar:/usr/local/ 
tomcat/bin/commons-logging-api.jar:/usr/local/tomcat/common/lib/ 
clearsilver.jar:/System/Library/Frameworks/JavaVM.framework/Versions/ 
1.5.0/Classes/.compatibility/14compatibility.jar

I have put libclearsilver-jni.so in /usr/lib/java and clearsilver.jar  
is in the location shown in the classpath.

When I hit the code that uses ClearSilver, I see this written to the  
console:

Could not load 'clearsilver-jni'

The other libraries in my /usr/lib/java are all either .dylib  
or .jnilib files.  The file command tells me these are "Mach-O  
universal binary with 2 architectures".  And the .so file is "ELF 32- 
bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped".   
Does that make any difference?  Is there a way to build the  
ClearSilver library as a .jnilib?

  Thanks,
    -M@
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.