Login  Register

Re: Please help me with compilating plugins in Eclipse

Posted by GeraldT on Oct 27, 2016; 6:44am
URL: http://imagej.273.s1.nabble.com/Please-help-me-with-compilating-plugins-in-Eclipse-tp5017486p5017489.html

Hello Curtis,

Thank you for trying to help me. Actually I have installed/uninstalled the JDK twice, and also downloaded the whole Fiji zip several times and tried to unpack it in several locations. I always got the error message "javac not found" or something like that. Maybe it is just the PC at my work which has problems. But I am more happy using Eclipse which helps me to easy draw GUIs.

The version of ImageJ I am using is the source package I downloaded yesterday, the version is 1.49q. My code is not on Github. I am just making small plugins enabling colleagues to easy mark and measure sites on oral x-rays. But if one of them gets really good maybe i should consider? I am not a real programmer, just a physicist helping on research projects.
Now I am just happy my "Hello world" plugin compiles and starts :-)

The thing is that I have to kill the javaw process in order to stop the ImageJ from running. From the Windows Task Manager.

Mvh
Gerald R. Torgersen


>-----Original Message-----
>From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Curtis
>Rueden
>Sent: Wednesday, October 26, 2016 7:13 PM
>To: [hidden email]
>Subject: Re: Please help me with compilating plugins in Eclipse
>
>Hi Gerald,
>
>> I did it!!!!! After all the years first time it worked!!
>
>Congratulations!
>
>> Since Fiji removed the tools.jar I cannot compile from the editor
>> anymore.
>
>We removed tools.jar (and javac.jar) specifically so that compilation from the
>Script Editor _would_ work for the Java-8 version of Fiji, which is the current
>version you get when you download from http://fiji.sc/#download.
>Did you test with a fresh download? It should work out of the box, as long as you
>have a JDK installed on your system.
>
>> Exception in thread "Quit" java.lang.NullPointerException
>>         at ij.WindowManager.getIDList(WindowManager.java:147)
>>         at ij.ImageJ.run(ImageJ.java:745)
>>         at java.lang.Thread.run(Thread.java:745)
>
>Which version of ImageJ 1.x are you using? Is your code on GitHub?
>
>Regards,
>Curtis
>
>--
>Curtis Rueden
>LOCI software architect - http://loci.wisc.edu/software
>ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden Did you know
>ImageJ has a forum? http://forum.imagej.net/
>
>
>On Wed, Oct 26, 2016 at 9:44 AM, Gerald Ruiner Torgersen <
>[hidden email]> wrote:
>
>> I did it!!!!! After all the years first time it worked!! I only had to
>> use the minimal project (https://github.com/imagej/min
>> imal-ij1-plugin/zipball/master). I did not read down there because I
>> thought the error was earlier in the process. I now used ImageJ and
>> not Fiji source.
>> There is still a tiny problem: The ImageJ does not close, I get an:
>> Exception in thread "Quit" java.lang.NullPointerException
>>         at ij.WindowManager.getIDList(WindowManager.java:147)
>>         at ij.ImageJ.run(ImageJ.java:745)
>>         at java.lang.Thread.run(Thread.java:745)
>>
>> Any advice here? Besides that I am happy, i don't know how many hours
>> I have tried ....
>>
>> Mvh
>> Gerald R. Torgersen
>>
>>
>> >-----Original Message-----
>> >From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
>> >Gerald Ruiner Torgersen
>> >Sent: Wednesday, October 26, 2016 2:17 PM
>> >To: [hidden email]
>> >Subject: Please help me with compilating plugins in Eclipse
>> >
>> >Hello everybody,
>> >
>> >Since Fiji removed the tools.jar I cannot compile from the editor
>> anymore. So
>> >now I am (again) trying to use the Eclipse, JDK combo.
>> >I have managed to import the Fiji source as maven project and run it
>> >from
>> Eclipse.
>> >I followed the instructions from:
>> >http://imagej.net/Developing_ImageJ_in_Eclipse. I am now trying to
>> >make a PluginFrame plugin.
>> >
>> >This is what I have done:
>> >- created new source folder with the name:
>> >MandibularAssymetryMeasure_
>> >- inside that catalog I made two class files:
>> >Main Plugin class:
>> >import ij.*;
>> >import ij.plugin.frame.*;
>> >
>> >public class MandibularAssymetryMeasure_ extends PlugInFrame {
>> >
>> >       private static final long serialVersionUID =
>> > 4723432002956229961L;
>> >
>> >       public MandibularAssymetryMeasure_() {
>> >               super("MandibularAssymetryMeasure_");
>> >       }
>> >
>> >       public void run(String arg) {
>> >               IJ.log("Hello World!");
>> >       }
>> >
>> >}
>> >Launcher:
>> >import fiji.Debug;
>> >
>> >public class Tester {
>> >
>> >       public static void main(String[] args) {
>> >               Debug.run("MandibularAssymetryMeasure_", null);
>> >       }
>> >
>> >}
>> >
>> >They both reside in the fiji-master folder. And I created the file
>> plugins.config in
>> >the fiji-master\resources folder:
>> ># Name: MandibularAssymetryMeasure_
>> ># Author: Gerald Torgersen
>> ># Version: 0.1
>> ># Date: 2016/10/xx
>> ># Requires: ImageJ 1.51f
>> >
>> >Plugins>MandibularAssymetryMeasure_, "Run
>> >Plugins>MandibularAssymetryMeasure_",
>> >Plugins>MandibularAssymetryMeasure_("run")
>> >
>> >I run the the Tester class as a Java application and it starts Fiji,
>> >but
>> I get an error
>> >message: Unrecognized command: "MandibularAssymetryMeasure_"
>> >
>> >I have not made a special pom-file for that plugin. I do not know
>> >how, or
>> where
>> >to put it. Please help me somebody. The Norwegian dental health
>> >depends
>> on my
>> >ImageJ programming ;-)
>> >
>> >Mvh
>> >Gerald R. Torgersen
>> >IT-seksjonen,
>> >Det odontologiske fakultet, Universitetet i Oslo Faculty of Dentistry
>> Universitetet i
>> >Oslo, University of Oslo
>> >http://www.odont.uio.no/personer/adm/fak/gerald
>> >
>> >--
>> >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

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