Login  Register

Re: Eclipse woes

Posted by Mark Hiner on Dec 02, 2015; 2:32pm
URL: http://imagej.273.s1.nabble.com/Eclipse-woes-tp5015004p5015087.html

Hi Gabriel,

>I had a go at this. Dowloaded the ImageJA, imported the maven project into
Eclipse, then somehow it compiled the source code under the
git/ImageJA/target

Maven outputs build artifacts (the .jar) in a special /target folder. If
you want to run in Eclipse you actually don't need to worry about this
output unless you want to distribute the .jar or test it in a Fiji
installation (Eclipse will compile your code either when you tell it to
launch an application, or continuously as changes are made).

>However, I do not see how to run the result from Eclipse, do I need to
specify a launcher or a script file?

The goal for launching a program is typically "find the main method and run
it."[1] In Fiji there are helper classes for launching with the appropriate
classpath from Eclipse[2], and in ImageJ 1.x you can just run the main
method in the ImageJ class[3].

Hope that helps.

Best,
Mark

[1]
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2FgettingStarted%2Fqs-12.htm
[2] http://imagej.net/Developing_Fiji_in_Eclipse#Running_and_Debugging
[3]
https://github.com/imagej/ImageJA/blob/v1.50e/src/main/java/ij/ImageJ.java#L654

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