That works perfectly for ScalaTest.  Thanks, Alex!

I'll keep an eye on BUILDR-537 for my issue with buildr shell.

Sean



On Sun, Oct 17, 2010 at 12:17 PM, Alex Boisvert <[email protected]> wrote:
> Hi Sean,
>
> ScalaTest currently runs test in the same VM as Buildr (through RJB if
> you're using MRI) so it's too late to pass the java.library.path through
> test.using.
>
> (Incidentaly, we should probably add support for the :fork option for
> ScalaTest).
>
> To get the library path set up correctly with RJB, either set the JAVA_OPTS
> environment variable before invoking Buildr,
>
> export JAVA_OPTS=-Djava.library.path=...
>
> or put the following at the top of your Buildfile,
>
> ENV["JAVA_OPTS"] = "-Djava.library.path=..."
>
> alex
>
> On Sun, Oct 17, 2010 at 8:07 AM, Sean Rhea <[email protected]> wrote:
>
>> 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
>> --
>> "I refuse to accept the idea that the ‘isness’ of man’s present nature
>> makes him morally incapable of reaching up for the eternal ‘oughtness’
>> that forever confronts him." --MLK
>>
>



-- 
"I refuse to accept the idea that the ‘isness’ of man’s present nature
makes him morally incapable of reaching up for the eternal ‘oughtness’
that forever confronts him." --MLK

Reply via email to