We're Hiring!

Split package org.w3c.dom using loci_tools.jar

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Split package org.w3c.dom using loci_tools.jar

Postby helaha » Tue Sep 04, 2018 8:01 am

Dear OME community,
I have been using loci_tools.jar for a long time, particularly to open Aperio svs jpeg2000 compressed files. Thanks a lot for this great package.
Recently, I have tried to modularize my project according to the new Java-9 modularity system. Unfortunately, I get following split package error because I am using the classes org.w3c.dom.Node and org.w3c.dom.Node for getting some header information:

"The package org.w3c.dom is accessible from more than one module: java.xml, loci.tools"

Here is a link to java.xml concerning org.w3c.dom:
https://docs.oracle.com/javase/9/docs/a ... mmary.html

Split packages are not any more allowed for Java9+ and therefore, I would like to ask if there is any possibility that a future release of loci_tools.jar does not include the org.w3c.dom package?

Many thanks in advance,
Helmut
helaha
 
Posts: 2
Joined: Sat Sep 01, 2018 4:13 pm

Re: Split package org.w3c.dom using loci_tools.jar

Postby dgault » Tue Sep 04, 2018 9:31 am

Hi Helmut,

One thing that may be easier for you in the long term is using the individual components of Bio-Formats that you require rather than the entire loci_tools jar. You can download the individual components from https://downloads.openmicroscopy.org/bi ... s/?C=M;O=D and an overview of what each one is can be found at https://docs.openmicroscopy.org/bio-for ... nents.html.

The particular class 'org.w3c.dom.Node' is however one which we use in some of our core classes so this will likely not solve your issue. What you may have to do as a work around is to use the java.xml prefix to specify where you are loading the package from.
Code: Select all
import java.xml.org.w3c.dom.Node


David Gault
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Re: Split package org.w3c.dom using loci_tools.jar

Postby helaha » Tue Sep 04, 2018 4:04 pm

Dear David,
Thanks a lot for you quick response and the very useful hint to use only subcomponents, I was not aware of this. Unfortunately, the prefix java.xml did not work, it could not be resolved.
I will eliminate these two classes from my project and hopefully I get the header information without it, avoiding the hassle of split packages.

Again, thanks a lot,
Helmut
helaha
 
Posts: 2
Joined: Sat Sep 01, 2018 4:13 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest

cron