Login  Register

Re: Compiling, directories, and jar files rules

Posted by Fred Damen on Jun 22, 2020; 6:47pm
URL: http://imagej.273.s1.nabble.com/Compiling-directories-and-jar-files-rules-tp5023539p5023567.html

Greetings,

First, thanks for the replies.

I was looking for the answer to the question 'how should installing
library JAR files be done?", and not how can this be done?  Philippe, your
answer seemed to be how you get around the hindrances to "Compile and Run"
as opposed to how this was setup (supposed) to work.  I find that
following the rules generally works best, albeit, this requires knowing
the rules first.

Now that I know this rule, I will proceed to a solution that resolves my
issue.

My 2 cents:  It would be nice if the .class files within one subdirectory
level below plugins are not ignored by "Compile and Run" when a JAR file
with an underscore in its name exists in said subdirectory.  It would be
really nice if the .class files that can be found when being run as a
plugin, they can also be found by "Compile and Run".

Thanks again,

Fred

On Sat, June 20, 2020 2:46 pm, CARL Philippe (LBP) wrote:

> Dear Wayne,
> I already made the very same answer on my reply sent yesterday, but this
> didn't seem to be the answer Fred was waiting for!
> Take care,
> Philippe
>
> ----- Mail original -----
> De: "Wayne Rasband" <[hidden email]>
> À: "imagej" <[hidden email]>
> Envoyé: Samedi 20 Juin 2020 18:34:47
> Objet: Re: Compiling, directories, and jar files rules
>
>> On Jun 18, 2020, at 4:33 PM, Fred Damen <[hidden email]> wrote:
>>
>> Greetings,
>>
>> I am seeing what seems strange when using "Compile and Run" regarding
>> class names and JAR file names.  I am trying to compile a Java plugin
>> that
>> uses a class for a plugin (Gnu_Plot) that I placed in a subdirectory
>> (Gnu_Plot) of plugins and created a jar file (Gnu_Plot.jar) for this
>> plugin,
>
> Library JAR files (e.g., Gnu_Plot.jar) should be located in the
> plugins/jars directory.
>
> -wayne
>
>
>> following https://imagej.nih.gov/ij/plugins/jar-demo.html. Running
>> Gnu_Plot from the menus works fine.  Trying to compile another plugin
>> that
>> calls Gnu_plot methods does not know of the existence of Gnu_Plot, Even
>> though the java source and class files exist in the subdirectory and jar
>> file. Renaming the jar file to GnuPlot.jar, with and without restarting
>> ImageJ, the "Compile and Run" now finds Gnu_Plot and this plugin
>> compiles
>> fine.
>>
>> a) In the case that I described above, where is "Compile and Run"
>> supposed
>> to find the class files, from within the jar file, from within
>> subdirectories? search order?
>> b) Is there a specific place that the class files need to be within the
>> jar file for them to be found during compiling?
>>
>> Thanks in advance,
>>
>> Fred
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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