Re: External Java libraries/Packages

Posted by ctrueden on
URL: http://imagej.273.s1.nabble.com/External-Java-libraries-Packages-tp5008328p5008353.html

Hi Haider,

> I tried importing ParallelColt by placing the jar file in the java
> folder inside Fiji: "Fiji.app/java/macosx-java3d/Home/lib/ext” .Then I
> tried importing it by writing: "import ParallelColt” or "from
> ParallelColt import jplasma" . And I get an error of module not found.
>
> I tried placing the jar inside the Fiji plugins folder instead but
> with still no success.

I saw that you posted the same question on StackOverflow, so I wrote a
thorough answer in reply. I am responding to the thread here so that anyone
else interested may benefit from it as well.

http://stackoverflow.com/a/24338287/1207769

Regards,
Curtis


On Thu, Jun 19, 2014 at 5:15 PM, Curtis Rueden <[hidden email]> wrote:

> Hi Haider,
>
> > I tried importing ParallelColt by placing the jar file in the java
> > folder inside Fiji: "Fiji.app/java/macosx-java3d/Home/lib/ext” .Then I
>  > tried importing it by writing: "import ParallelColt” or "from
> > ParallelColt import jplasma" . And I get an error of module not found.
> >
> > I tried placing the jar inside the Fiji plugins folder instead but
> > with still no success.
>
> Put all needed JAR libraries into the "jars" directory.
>
> Or, if you want to avoid that hassle, use Maven [1, 2] and put the
> following dependencies into your pom.xml:
>
> <dependency>
>     <groupId>net.sourceforge.parallelcolt</groupId>
>     <artifactId>parallelcolt</artifactId>
>     <version>0.10.1</version>
> </dependency>
> <dependency>
>     <groupId>net.mikera</groupId>
>     <artifactId>vectorz</artifactId>
>     <version>0.34.0</version>
> </dependency>
>
> Regards,
> Curtis
>
> [1] http://wiki.imagej.net/Maven
> [2] https://github.com/imagej/minimal-ij1-plugin
>
>
> On Thu, Jun 19, 2014 at 11:30 AM, haider <[hidden email]>
> wrote:
>
>> Hello everyone,
>>
>> I am writing a plugin that requires the need for external numerical
>> libraries (ParallelColt and Vectorz in my case). I am using the Fiji
>> script
>> editor to write my functions. I tried importing ParallelColt by placing
>> the
>> jar file in the java folder inside Fiji:
>> "Fiji.app/java/macosx-java3d/Home/lib/ext” .Then I tried importing it by
>> writing: "import ParallelColt” or "from ParallelColt import jplasma" .
>> And I
>> get an error of module not found.
>>
>> I tried placing the jar inside the Fiji plugins folder instead but with
>> still no success. I also tried by using the folder with all the java
>> classes
>> of ParallelColt instead of the jar file and I still was not able to import
>> the classes from my script.
>>
>> I realize that this may be a very silly question but this is my first time
>> working with Fiji and it is essential for my project to be able to use
>> these
>> external packages.
>>
>> Thanks
>>
>> Haider Khan
>>
>>
>>
>> --
>> View this message in context:
>> http://imagej.1557.x6.nabble.com/External-Java-libraries-Packages-tp5008328.html
>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html