Discussion:
[FreeMarker-user] FreeMarker's usage of com.sun.* packages and JDK9
Christopher BROWN
2015-07-29 11:27:45 UTC
Permalink
Hello,

I just ran the "jdeps" tool against FreeMarker 2.3.23 and it identified the
following incompatible package usage as of JDK9 :

jdeps freemarker.jar | grep 'JDK internal'
-> com.sun.org.apache.xml.internal.utils JDK internal
API (rt.jar)
-> com.sun.org.apache.xpath.internal JDK internal
API (rt.jar)
-> com.sun.org.apache.xpath.internal.objects JDK internal
API (rt.jar)

Refer to:
https://wiki.openjdk.java.net/display/Adoption/JDK+9+Outreach#JDK9Outreach-Runjdepsonyourcode

Any plans to fix this?

Thanks,
Christopher
Daniel Dekany
2015-07-29 20:22:34 UTC
Permalink
Does it actually cause error on JDK 9?

Note that FreeMarker only uses those com.sun packages if Xalan
(org.apache.xpath specifically) is not in the class path. If neither
is found, it just disables XPath support in its DOM wrapper, which
will cause error when a template tries to use XPath. (Also if someone
configures FM to use Jaxen, it won't look for any of these.)

Anyway, it might worth reviewing if on modern Java versions the
desired functionality has become part of the public XML API-s. But
there's not such activity going on right now.
--
Thanks,
Daniel Dekany
Post by Christopher BROWN
Hello,
I just ran the "jdeps" tool against FreeMarker 2.3.23 and it
jdeps freemarker.jar | grep 'JDK internal'
-> com.sun.org.apache.xml.internal.utils JDK internal API (rt.jar)
-> com.sun.org.apache.xpath.internal JDK internal API (rt.jar)
-> com.sun.org.apache.xpath.internal.objects JDK internal API (rt.jar)
https://wiki.openjdk.java.net/display/Adoption/JDK+9+Outreach#JDK9Outreach-Runjdepsonyourcode
Any plans to fix this?
Thanks,
Christopher
------------------------------------------------------------------------------
Christopher BROWN
2015-07-29 20:39:26 UTC
Permalink
I don't use this feature of FreeMarker, so I haven't had any bother with
it. Just thought I'd let you know, having run "jdeps" on FreeMarker (and
other dependencies).

Hope that helps someone,
Christopher
Post by Daniel Dekany
Does it actually cause error on JDK 9?
Note that FreeMarker only uses those com.sun packages if Xalan
(org.apache.xpath specifically) is not in the class path. If neither
is found, it just disables XPath support in its DOM wrapper, which
will cause error when a template tries to use XPath. (Also if someone
configures FM to use Jaxen, it won't look for any of these.)
Anyway, it might worth reviewing if on modern Java versions the
desired functionality has become part of the public XML API-s. But
there's not such activity going on right now.
--
Thanks,
Daniel Dekany
Post by Christopher BROWN
Hello,
I just ran the "jdeps" tool against FreeMarker 2.3.23 and it
jdeps freemarker.jar | grep 'JDK internal'
-> com.sun.org.apache.xml.internal.utils JDK internal
API (rt.jar)
Post by Christopher BROWN
-> com.sun.org.apache.xpath.internal JDK internal
API (rt.jar)
Post by Christopher BROWN
-> com.sun.org.apache.xpath.internal.objects JDK internal
API (rt.jar)
https://wiki.openjdk.java.net/display/Adoption/JDK+9+Outreach#JDK9Outreach-Runjdepsonyourcode
Post by Christopher BROWN
Any plans to fix this?
Thanks,
Christopher
Loading...