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 |
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 |
Hi Wilhelm,
Thanks for the advice, but I am not sure it will work for me. My plugin is pretty complex. If I have ImageJ source in the project I can check syntax in the editor and search the ImageJ files. I even used to be able to debug the plugin. Will that work using your method? My plugin produces many class files and needs to be bundled into a .jar file. I am not sure what is going on with windows 7. I realize now that the javac compiler should be in tools.jar. Why this is not being recognized I don't know. Does anyone have any ideas how I can troubleshoot this? Jon Burger Wilhelm wrote: > 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 > |
Free forum by Nabble | Edit this page |