Path: csiph.com!aioe.org!.POSTED.O5hsyUvK01te0L/SZurVSQ.user.gioia.aioe.org!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: more porting issues to Java 11 Date: Wed, 3 Apr 2019 14:28:25 -0400 Organization: Aioe.org NNTP Server Lines: 50 Message-ID: References: NNTP-Posting-Host: O5hsyUvK01te0L/SZurVSQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: csiph.com comp.lang.java.programmer:38856 On 4/3/2019 1:21 PM, Andreas Leitgeb wrote: > My application unfortunately uses a couple of features that were removed > in Java 11. > > One, of which I was a bit more optimistic of finding a substitute was the > package hierarchy javax.xml.bind and in particular (among others) the classes > JAXBContext, Marshaller and Unmarshaller > therein. > > Some googling led me to: > https://blog.codefx.org/java/java-11-migration-guide/ > and a section named "Fixes", that names "JAXB: com.sun.xml.bind:jaxb-impl" -> > https://search.maven.org/search?q=g:com.sun.xml.bind%20AND%20a:jaxb-impl&core=gav > of which I picked the latest 2.3.2 (Jan '19) > > Now it seems I don't really have a grasp on the problem yet, because > the jarfile I got from maven didn't have either of the classes mentioned > above - it had some *Impl classes in entirely different packages, but > not the said ones. And even JAXBContextImpl didn't have the static > method "newInstance(Class)" that is expected in my code, thus isn't > a substitute for JAXBContext. I go to: https://javaee.github.io/jaxb-v2/ Download: https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-ri/2.3.1/jaxb-ri-2.3.1.zip Unzip. Add all jar files in the mod dir to classpath. And my JAXB example works. Actually I did only need: istack-commons-runtime.jar javax.activation-api.jar jaxb-api.jar jaxb-runtime.jar But OK that is only version 2.3.1. Let me see if I can find 2.3.2 as well. Arne