[ome-devel] Question regarding importing Bio-Formats libraries in NetBeans
Curtis Rueden
ctrueden at wisc.edu
Wed Aug 3 15:42:36 BST 2016
Hi Mirella,
Note also that Bio-Formats consists of Maven projects. In NetBeans, it
should be as simple as File > Open Project... and select the toplevel
Bio-Formats directory. Then you can open the Modules folder and
double-click desired modules. I tested this just now with the "Bio-Formats
command line tools" module (which has several example main methods) and was
able to successfully build and run Bio-Formats code from within NetBeans.
For your own project, I strongly suggest using a modern build system such
as Maven. Then you can simply add a dependency to e.g.
ome:formats-gpl:5.1.10. There is really no need to manually manage your
dependencies these days.
Regards,
Curtis
P.S. If you extend the org.scijava:pom-scijava parent POM, the version of
Bio-Formats and many other useful libraries is managed automatically for
you. For details, see: http://imagej.net/Architecture,
http://imagej.net/Maven
--
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, Aug 3, 2016 at 4:00 AM, David Gault (Staff) <d.gault at dundee.ac.uk>
wrote:
> Hi Mirella,
>
> In NetBeans the following steps should allow you to add the Bio-Formats
> libraries to your project:
> - Right click on the your plugin project on the left hand panel and select
> Properties
> - Under the Libraries category select 'Add Jar/Folder’
> - Select the individual Bio-Formats jars or the folder containing them and
> select ‘Choose'
> - You should now see the jars appearing in a Library folder in the
> Projects panel on the left
>
> I hope that will be enough to get you up and running for your project.
>
> With Thanks,
> David Gault
>
> On 2 Aug 2016, at 18:35, Mirella Koleva <mirella.koleva at dpag.ox.ac.uk>
> wrote:
>
> Hi All,
>
> I am using the NetBeans IDE to develop a plugin for ImageJ in the Java
> language. The plugin needs Bio-Formats to open the image to be analysed. I
> am new to using NetBeans and what I am having problems with is figuring out
> how to add the Bio-Formats Java libraries to my NetBeans project.
>
> I have searched very extensively on the internet for a solution and
> nothing seems to work.
> Amongst other things, I have tried:
>
> 1) Downloading formats-gpl.jar and putting it in the CLASSPATH and
> build path, as advised on the OME website
> http://www.openmicroscopy.org/site/support/bio-formats5.1/developers/java-library.html
>
> 2) Right-clicking on the ‘Dependencies’ folder of my NetBeans plugin
> project, selecting ‘Add Dependency…’, clicking on the ‘Dependency
> Management’ tab and selecting ‘ome : formats-gpl : [ jar ]’.
>
> 3) Adding a global library in the Ant Library Manager by selecting
> Tools > Libraries, clicking on ‘New Library…’, then in both the ‘Classpath’
> and ‘Sources’ tabs clicking on ‘Add JAR/Folder’ and choosing the right path
> to the .jar downloaded in 1).
>
> Regardless of this, NetBeans still doesn’t recognise the libraries I want
> to import: it underlines them in red and when I hover on the left-hand side
> over the warning icons, a pop-up bubble says ‘package does not exist’.
>
> I am attaching here a snapshot of my screen.
>
> I’d be very grateful for any tips regarding this issue!
>
> With many thanks,
>
> Mirella
> <PrtScr_NetBeans.png>_______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
>
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20160803/abfd6524/attachment.html>
More information about the ome-devel
mailing list