atom feed4 messages in org.apache.buildr.usersPassing -Djava.library.path=target/na...
FromSent OnAttachments
Sean RheaOct 17, 2010 8:06 am 
Alex BoisvertOct 17, 2010 9:17 am 
Alex BoisvertOct 17, 2010 9:38 am 
Sean RheaOct 17, 2010 10:04 am 
Subject:Passing -Djava.library.path=target/native to all tasks
From:Sean Rhea (sean@gmail.com)
Date:Oct 17, 2010 8:06:46 am
List:org.apache.buildr.users

Hi,

I'm working on moving a Scala library for accessing sqlite3 to Buildr. As this library wraps the C interface to sqlite3, it contains some JNI code. On MacOS, the only way to pick up a JNI library is to add it to the current directory, or to pass a java.library.path property to the JVM. I took a look at lib/buildr/scala/shell.rb, and it doesn't look like there's any way to pass properties to the JVM when involving the Scala shell. (At least, not in version 1.4.3.)

I also tried to use ScalaTest with my project, and I added this line to the buildfile:

test.using :properties => { "java.library.path" => "target/native" }

But that doesn't seem to pick up the library, either.

If I run this from the command line, it works fine:

scala -classpath target/classes -Djava.library.path=target/native Test

What am I missing?

Thanks in advance, Sean