Page 1 of 1

Split package org.w3c.dom using loci_tools.jar

PostPosted: Tue Sep 04, 2018 8:01 am
by helaha
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

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

PostPosted: Tue Sep 04, 2018 9:31 am
by dgault
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

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

PostPosted: Tue Sep 04, 2018 4:04 pm
by helaha
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