Login  Register

Re: Compiling plugins windows7 eclipse

Posted by Burger Wilhelm on Jan 31, 2011; 11:26am
URL: http://imagej.273.s1.nabble.com/Compiling-plugins-windows7-eclipse-tp3685868p3685869.html

Hello Jon,

there should be no need to compile ImageJ from source. The way I usually set up simple plugin projects in Eclipse is like this:

1) Make <ImageJ>/plugins the default output folder of the Eclipse project. This will cause Eclipse to store the compiled .class files in the plugins folder.
2) Include ij.jar as an "External JAR" file.
3) Start ImageJ and execute the compiled plugin (.class file!) using the Compile-And-Run command.

Good luck,
Wilhelm



> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Jon Harman
> Sent: Sunday, January 30, 2011 8:58 PM
> To: [hidden email]
> Subject: Compiling plugins windows7 eclipse
>
> Hi,
> I have been trying to use eclipse (Helios) to compile ImageJ on a
> Windows 7 machine.  I imported the project from the source using the
> ant
> build.xml file. I can get ImageJ to compile (both 64 bit and 32 bit
> versions), but it won't compile my plugin.  This is the whole point of
> my compiling ImageJ from source, to be able to use eclipse in the
> development of my plugin.
>
> I add tools.jar as an external jar file.
>
> I get different errors depending on if I am using 64 or 32 bit tools
> and
> JDK.  Lets stick to 32 bit for now.
>
> I get this message:
> Unable to find the javac compiler...
> Java.home:C:\Program files (x86)\Java\jdk1.6.0_23\jre
>
> (Note that I changed the default jre in eclipse to the jdk jre)
>
> Of course the javac compiler really is there in jdk1.6.0_23\bin
> Maybe com.sun.tools.javac.Main should be com.oracle.tools.javac.Main??
> (nope)
>
> Can anyone help?
> Jon