Hi, I'm new to ImageJ and I would like to know how to add the library to my build path (to use the functionality in my code)?
I've found a lot of documentation about creating plug-ins, but found next to nothing about using it as a third-party library. From what I have seen, it looks like I should add the ij.jar file to the build path (like with other libraries), but something won't let me and I was wondering if someone could tell me what i'm doing wrong? Outside of Eclipse I can locate the jar file by right-clicking on the application and selecting 'show package contents', however in Eclipse I click on 'add external jars' and try the same thing, but only get the option 'quick look'. I can't seem to get to the jar file. I've also tried dragging the file from my hard drive into eclipse and copying the file without any luck. I'm running Mac OSX Mountain Lion and Eclipse Juno. Can anyone tell me what I'm doing wrong? or if you have another way of adding the library to a project please let me know! Thanks! |
2013/7/12 Number5 <[hidden email]>:
> Outside of Eclipse I can locate the jar file by right-clicking on the > application and selecting 'show package contents', however in Eclipse I > click on 'add external jars' and try the same thing, but only get the option > 'quick look'. I can't seem to get to the jar file. When you add an external .jar file in Eclipse you should get a file browser to search for the file you want to add. What is exactly the problem you are encountering? Best, José. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> When you add an external .jar file in Eclipse you should get a file
> browser to search for the file you want to add. What is exactly the > problem you are encountering? Hi, Thanks for replying. Yes I get the file browser, but i don't know how to navigate to the .jar file as it seems to be located inside the ImageJ application. The Eclipse file browser won't let me access this! However, in a file browser outside Eclipse (in finder) I can access the .jar file by right clicking on the ImageJ application icon and selecting 'show package contents'. I can't do this in Eclipse! It won't give me the option! I would just like to know how to access the .jar file (when it is located inside the application)? Or if there is another way to add it to my build path? Thanks |
2013/7/12 Number5 <[hidden email]>:
> > Thanks for replying. Yes I get the file browser, but i don't know how to > navigate to the .jar file as it seems to be located *inside* the ImageJ > application. The Eclipse file browser won't let me access this! > > However, in a file browser *outside* Eclipse (in finder) I can access the > .jar file by right clicking on the ImageJ application icon and selecting > 'show package contents'. I can't do this in Eclipse! It won't give me the > option! > > I would just like to know how to access the .jar file (when it is located > inside the application)? Or if there is another way to add it to my build > path? I think I understand what is happening. The ImageJ ij.jar file is placed inside the ImageJ installation directory. You have to search for that folder in your directory tree. If you are using Windows, I think the default installation path goes along the lines of C:\Program Files\ImageJ, so try that or similar combinations. Best, José. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> I think I understand what is happening. The ImageJ ij.jar file is
> placed inside the ImageJ installation directory. You have to search > for that folder in your directory tree. Yup, that is the problem! But I don't know how to access the installation directory inside the Eclipse file browser? > If you are using Windows, I > think the default installation path goes along the lines of C:\Program > Files\ImageJ, so try that or similar combinations. I'm using a Mac!! Do you know the Mac equivalent? I've tried right-clicking. Thanks -- View this message in context: http://imagej.1557.x6.nabble.com/How-do-I-add-imageJ-fiji-libraries-to-my-project-build-path-in-Eclipse-tp5003932p5003948.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by José María Mateos
> I think I understand what is happening. The ImageJ ij.jar file is
> placed inside the ImageJ installation directory. You have to search > for that folder in your directory tree. Yup, that is the problem! But I don't know how to access the installation directory inside the Eclipse file browser? > If you are using Windows, I > think the default installation path goes along the lines of C:\Program > Files\ImageJ, so try that or similar combinations. I'm using a Mac!! Do you know the Mac equivalent? I've tried right-clicking. Thanks |
In reply to this post by Number5
Just type in imagej.jar in spotlight. It is not found within the actual
program as you're suggesting, it's just in a folder. In fact, if I'm not mistaken, for Mac you just downloaded imagej.zip and , it. The unzipped folder is just named imagej and contains imagej.jar, but it's location is based on where you downloaded it to. Most importantly, the problem you think you're having is not an issue. It's not hidden within a program, it's in a folder that is readily navigatable via eclipse as well as finder. Just use spotlight and find the location on your mac On Jul 12, 2013 6:34 AM, "Number5" <[hidden email]> wrote: > > I think I understand what is happening. The ImageJ ij.jar file is > > placed inside the ImageJ installation directory. You have to search > > for that folder in your directory tree. > > Yup, that is the problem! But I don't know how to access the installation > directory inside the Eclipse file browser? > > > If you are using Windows, I > > think the default installation path goes along the lines of C:\Program > > Files\ImageJ, so try that or similar combinations. > > I'm using a Mac!! Do you know the Mac equivalent? I've tried > right-clicking. > > Thanks > > > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/How-do-I-add-imageJ-fiji-libraries-to-my-project-build-path-in-Eclipse-tp5003932p5003948.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Another option is to download the ImageJ .zip file and extract the
.jar file from there. If you are going to use it as a library, that option is as good as using the ij.jar file from your current installation. Best, José. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Benjamin Grant
> Just type in imagej.jar in spotlight. It is not found within the actual
> program as you're suggesting, it's just in a folder. One of the first things I did was try and find it through spotlight! It did not find ij.jar. I tried a lot of keywords and even searched through all .jar files. > In fact, if I'm not > mistaken, for Mac you just downloaded imagej.zip and , it. The unzipped > folder is just named imagej and contains imagej.jar, but it's location is > based on where you downloaded it to. > Most importantly, the problem you think you're having is not an issue. It's > not hidden within a program, it's in a folder that is readily navigatable > via eclipse as well as finder. Just use spotlight and find the location on > your mac I got the zip, unzipped it. I found ij.jar (outside eclipse) by right-clicking the application icon (the microscope) and selecting 'show package contents'. After this it was located in contents/resources/java I don't know how to access this in Eclipse as the option 'show package contents' is not there! Like I said, spotlight didn't work. It is not readily navigable for me, although it might be for others. |
Hi
I don't know Eclipse well, but adding the ij jar file should be done by "open" or "add", navigating to ImageJ app, which than is shown as a folder (in fact apps are folders) and there you find the jar file similar as with "show package content". Karsten Am 12.07.2013 um 14:25 schrieb Number5 <[hidden email]>: >> Just type in imagej.jar in spotlight. It is not found within the actual >> program as you're suggesting, it's just in a folder. > > One of the first things I did was try and find it through spotlight! It did > not find ij.jar. I tried a lot of keywords and even searched through all > .jar files. > >> In fact, if I'm not >> mistaken, for Mac you just downloaded imagej.zip and , it. The unzipped >> folder is just named imagej and contains imagej.jar, but it's location is >> based on where you downloaded it to. >> Most importantly, the problem you think you're having is not an issue. >> It's >> not hidden within a program, it's in a folder that is readily navigatable >> via eclipse as well as finder. Just use spotlight and find the location on >> your mac > > I got the zip, unzipped it. I found ij.jar (outside eclipse) by > right-clicking the application icon (the microscope) and selecting 'show > package contents'. After this it was located in contents/resources/java I > don't know how to access this in Eclipse as the option 'show package > contents' is not there! > > Like I said, spotlight didn't work. It is not readily navigable for me, > although it might be for others. > > > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/How-do-I-add-imageJ-fiji-libraries-to-my-project-build-path-in-Eclipse-tp5003932p5003953.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html Karsten [hidden email] -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> I don't know Eclipse well, but adding the ij jar file should be done by "open" or "add", navigating to ImageJ > app, which than is shown as a folder (in fact apps are folders) and there you find the jar file
> similar as with "show package content". I know that I can navigate into the app folder because I did so outside Eclipse. There might be something different about my settings or i'm missing something obvious! Once I click the application, I can't go further. But thanks for all your help! I found a solution by dragging the .jar file from the file browser in finder into the file browser in Eclipse! I was trying to drag it all sorts of places before, but obviously didn't try dragging it from browser to browser till now. |
Hi,
On 12.07.2013 2:59 PM, Number5 wrote: >> I don't know Eclipse well, but adding the ij jar file should be done by > "open" or "add", navigating to ImageJ > app, which than is shown as a folder > (in fact apps are folders) and there you find the jar file >> similar as with "show package content". > > I know that I can navigate into the app folder because I did so outside > Eclipse. There might be something different about my settings or i'm missing > something obvious! Once I click the application, I can't go further. The file open dialogs on Mac don't let you access the package contents as you can do in Finder. As a workaround, you can Alt-Cmd-Drag any folder (e.g. Fiji.app/jars) out of the .app package into a normal, accessible folder on your disk. This will create a symlink/alias that is accessible also via the file chooser dialogs. Hth, Jan -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
On that note, my apologies, as I was clearly totally wrong
Ben On Jul 12, 2013 8:26 AM, "Jan Eglinger" <[hidden email]> wrote: > Hi, > > On 12.07.2013 2:59 PM, Number5 wrote: > >> I don't know Eclipse well, but adding the ij jar file should be done by > > "open" or "add", navigating to ImageJ > app, which than is shown as a > folder > > (in fact apps are folders) and there you find the jar file > >> similar as with "show package content". > > > > I know that I can navigate into the app folder because I did so outside > > Eclipse. There might be something different about my settings or i'm > missing > > something obvious! Once I click the application, I can't go further. > > The file open dialogs on Mac don't let you access the package contents > as you can do in Finder. > As a workaround, you can Alt-Cmd-Drag any folder (e.g. Fiji.app/jars) > out of the .app package into a normal, accessible folder on your disk. > This will create a symlink/alias that is accessible also via the file > chooser dialogs. > > Hth, > Jan > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Number5
To add a JAR file that is outside your Eclipse project simply use the menu
Project -> Properties -> Java Build Path -> Libraries -> Add External Jars... and navigate to the desired Jar file. This lets you add Java libraries from anywhere in your file system. --Wilhelm > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Number5 > Sent: Friday, July 12, 2013 12:33 AM > To: [hidden email] > Subject: How do I add imageJ/fiji libraries to my project build path in Eclipse? > > Hi, I'm new to ImageJ and I would like to know how to add the library to my > build path (to use the functionality in my code)? > > I've found a lot of documentation about creating plug-ins, but found next to > nothing about using it as a third-party library. From what I have seen, it > looks like I should add the ij.jar file to the build path (like with other > libraries), but something won't let me and I was wondering if someone could > tell me what i'm doing wrong? > > Outside of Eclipse I can locate the jar file by right-clicking on the > application and selecting 'show package contents', however in Eclipse I > click on 'add external jars' and try the same thing, but only get the option > 'quick look'. I can't seem to get to the jar file. > > I've also tried dragging the file from my hard drive into eclipse and > copying the file without any luck. I'm running Mac OSX Mountain Lion and > Eclipse Juno. > > Can anyone tell me what I'm doing wrong? or if you have another way of > adding the library to a project please let me know! > > Thanks! > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/How-do-I- > add-imageJ-fiji-libraries-to-my-project-build-path-in-Eclipse-tp5003932.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Jan Eglinger
> The file open dialogs on Mac don't let you access the package contents
> as you can do in Finder. > As a workaround, you can Alt-Cmd-Drag any folder (e.g. Fiji.app/jars) > out of the .app package into a normal, accessible folder on your disk. > This will create a symlink/alias that is accessible also via the file > chooser dialogs. Thank you so much :) I spent ages trying to work it out. I'm sure this will help others as well. |
In reply to this post by Number5
Hi Number5,
> But I don't know how to access the installation directory inside the > Eclipse file browser? - In Finder, right-click the ImageJ application - Choose "Show package contents" - Navigate into Contents, Resources, Java - Click on ij.jar - Press Command+C to copy the file - Click your Desktop - Press Command+V to paste - Now in Eclipse, navigate to your Desktop and use that copy of ij.jar HTH, Curtis On Fri, Jul 12, 2013 at 6:38 AM, Number5 <[hidden email]> wrote: > > I think I understand what is happening. The ImageJ ij.jar file is > > placed inside the ImageJ installation directory. You have to search > > for that folder in your directory tree. > > Yup, that is the problem! But I don't know how to access the installation > directory inside the Eclipse file browser? > > > If you are using Windows, I > > think the default installation path goes along the lines of C:\Program > > Files\ImageJ, so try that or similar combinations. > > I'm using a Mac!! Do you know the Mac equivalent? I've tried > right-clicking. > > Thanks > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/How-do-I-add-imageJ-fiji-libraries-to-my-project-build-path-in-Eclipse-tp5003932p5003949.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Number5
Hi Number5,
did you care to look at the response I sent on July 12?: https://list.nih.gov/cgi-bin/wa.exe?A2=ind1307&L=IMAGEJ&F=&S=&P=116506 --Wilhelm > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Number5 > Sent: Friday, July 12, 2013 1:39 PM > To: [hidden email] > Subject: Re: How do I add imageJ/fiji libraries to my project build path in > Eclipse? > > > I think I understand what is happening. The ImageJ ij.jar file is > > placed inside the ImageJ installation directory. You have to search > > for that folder in your directory tree. > > Yup, that is the problem! But I don't know how to access the installation > directory inside the Eclipse file browser? > > > If you are using Windows, I > > think the default installation path goes along the lines of C:\Program > > Files\ImageJ, so try that or similar combinations. > > I'm using a Mac!! Do you know the Mac equivalent? I've tried right-clicking. > > Thanks > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/How-do-I- > add-imageJ-fiji-libraries-to-my-project-build-path-in-Eclipse- > tp5003932p5003949.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> did you care to look at the response I sent on July 12?:
> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1307&L=IMAGEJ&F=&S=&P=116506 Hi, I think you misunderstood the problem. I know how to add a .jar file to my project, but the problem was that I could not locate the file in the Eclipse file browser due to its location (inside the application contents folder). Jan Eglinger wrote above that on a mac it is not possible to access this location in file open dialogues. However, I was offered many solutions that are posted above. Thanks anyway! :) |
Free forum by Nabble | Edit this page |