Login  Register

Re: another question about developing plungins under netbeas

Posted by ctrueden on Sep 25, 2007; 3:34pm
URL: http://imagej.273.s1.nabble.com/another-question-about-developing-plungins-under-netbeas-tp3698329p3698330.html

Hi Nicola,

> I try to add also parameter "-cp PATH_OF_JAR", but doesn't work...

You had the right idea, but you need to specify the full path to the
JAR file, not just its containing folder. Java does not automatically
read all JAR files in a given folder, only .class files.

-Curtis

On 9/25/07, Nicola B. <[hidden email]> wrote:

> My Netbeans finally working for developing imageJ plugin.
> I'm not pratice with ANT and I have a question:
> I see that to use a dll library under a plugin (tell me if I wrong or
> exist more elegant method) I can modify build.xml including
> "-Djava.library.path" parameter:
>
> <target name="run" depends="build" description="Build and run ImageJ.">
> <copy file="ij.jar" toDir=".." />
> <java maxmemory="256m" jar="ij.jar" fork="yes"
> jvmargs="-Djava.library.path='PATH_TO_DLL_FOLDER_THAT_I_WANT_TO_INCLUDE'" />
> </target>
>
>
> Now my question is:
> How can I include a JAR (or/and a NB library) without manual copy it in
> JDK\JRE\LIB\EXT ??
> I try to add also parameter "-cp PATH_OF_JAR", but doesn't work...
> In a standard (no ant) NB project this is done simple by open project
> properties -> Libraries -> Add JAR (library), but here???
>
> Thanks a lot,
>
>     -Nicola
>