Re: Batik 1.9 and Java 9

Peter Hull <[email protected]> Wed, 11 Oct 2017 09:57:49 +0000
Newsgroups gmane.text.xml.batik.user
Message-ID <CAK9Gx1fa+dQaPUhtyPGjT0nM9aNzLD9H_=bi449Y=fg72idwaA@mail.gmail.com>
--001a113e100469e7b8055b4275b1
Content-Type: text/plain; charset="UTF-8"

Further to this, I built batik-1.9 from source using JDK9 and got the same
issue.

Investigating, this is due to:
java.lang.NoClassDefFoundError: org/w3c/dom/Window

Class org.w3c.dom.Window is defined in batik-ext.jar. Other classes in the
org.w3c.dom package (e.g. Node) are provided by the runtime (running with
-verbose says it's from jrt:/java.xml) but Window isn't. My conjecture is
that this prevents the classloader from looking any further into jars
specified by the application, and maybe this has changed between JDK8 and 9.

I then renamed the package in the source for batik-ext.jar and fixed up all
the references in the rest of batik. Obviously this is only a hack. Then I
found that I could start squiggle and open an SVG file. I don't know if
this caused any other issues elsewhere.

Hope this helps,
Peter



On Fri, 6 Oct 2017 at 11:08 Peter Hull <[email protected]> wrote:

> The binary download of Batik Squiggle 1.9 is not working for me under Java
> 9 (Windows 10); it hangs whilst displaying the splash screen. I believe
> this has already been reported in December 2016[1].
> I can investigate further but I wanted to check first in case it was
> already known about and fixed.
> Thanks,
> Peter
> [1]:
> http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/201612.mbox/raw/%3C006f01d252da%24286b8950%2479429bf0%24%40tosovsky%40tiscali.cz%3E
>

--001a113e100469e7b8055b4275b1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div>Further to this, I built batik-1.=
9 from source using JDK9 and got the same issue.</div><div><br></div>Invest=
igating, this is due to:<br>java.lang.NoClassDefFoundError: org/w3c/dom/Win=
dow<br><br></div>Class org.w3c.dom.Window is defined in batik-ext.jar. Othe=
r classes in the org.w3c.dom package (e.g. Node) are provided by the runtim=
e (running with -verbose says it&#39;s from jrt:/java.xml) but Window isn&#=
39;t. My conjecture is that this prevents the classloader from looking any =
further into jars specified by the application, and maybe this has changed =
between JDK8 and 9.<br><br></div>I then renamed the package in the source f=
or batik-ext.jar and fixed up all the references in the rest of batik. Obvi=
ously this is only a hack.

Then I found that I could start squiggle and open an SVG file. I don&#39;t =
know if this caused any other issues elsewhere. <br><br></div>Hope this hel=
ps,<br></div>Peter<br><div><div><div><br><br></div></div></div></div><br><d=
iv class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 6 Oct 2017 at 11:08 Peter=
 Hull &lt;<a href=3D"mailto:[email protected]">[email protected]</a=
>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>=
<div><div>The binary download of Batik Squiggle 1.9 is not working for me u=
nder Java 9 (Windows 10); it hangs whilst displaying the splash screen. I b=
elieve this has already been reported in December 2016[1]. <br></div>I can =
investigate further but I wanted to check first in case it was already know=
n about and fixed.<br></div>Thanks,<br></div>Peter<br>[1]:<a href=3D"http:/=
/mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/201612.mbox/raw/=
%3C006f01d252da%24286b8950%2479429bf0%24%40tosovsky%40tiscali.cz%3E" target=
=3D"_blank">http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-user=
s/201612.mbox/raw/%3C006f01d252da%24286b8950%2479429bf0%24%40tosovsky%40tis=
cali.cz%3E</a><br></div></blockquote></div>

--001a113e100469e7b8055b4275b1--