Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38994

Re: How do I compile my Java 8 SE code with OpenJDK 11?

From Andrew J <aj@f-m.fm>
Newsgroups comp.lang.java.programmer
Subject Re: How do I compile my Java 8 SE code with OpenJDK 11?
Date 2019-07-04 01:45 -0400
Organization A noiseless patient Spider
Message-ID <qfk3pq$ue1$1@dont-email.me> (permalink)
References <19942fd8-6ea3-457f-ac8b-3dab01a5ba37@googlegroups.com>

Show all headers | View raw


Eric Douglas wrote:
> Issues:
> 1) How to reference javafx?
> 2) How to reference javax.xml.soap?
> 3) How to reference javax.xml.bind?
> 4) How to resolve error message "The package org.w3c.dom is accessible from more than one module: batik.all, java.xml, xml.apis.ext"?
> 

Java 11 removed JavaFX and JAX-WS (which includes javax.xml.soap and 
javax.xml.bind).  There are a couple options, and slightly different 
depending on JavaFX vs JAX-WS:

  - For JavaFX alone, the easiest way I know of is to switch to the 
Liberica JDK, which includes JavaFX.  You can download it at 
https://bell-sw.com/.  I've successfully tested its Java 11 release with 
my JavaFX programs.
  - For JAX-WS, it looks like you can add it as a Maven dependency:
<dependency>
   <groupId>com.sun.xml.ws</groupId>
   <artifactId>jaxws-ri</artifactId>
   <version>2.3.2</version>
   <type>pom</type>
</dependency>
I haven't used JAX-WS, so I can't vouch that that is the only artifactId 
you will need.
  - For JavaFX with the OpenJDK, or other JDKs that don't include it, 
you'll need to use Maven/Gradle/etc. to pull in OpenJFX as a dependency, 
with groupId org.openjfx and artifactId javafx-maven-plugin.  I've done 
this once with success.  There is documentation at 
https://openjfx.io/openjfx-docs/, although it looks like you'll have to 
refer to Maven Central for the right version.  I've done this once but 
it was last year, and I'm rusty on the nuances of it.

I am not sure about the 4th issue, as I haven't switched to the module 
system, and haven't run into that one yet.

Hope this helps!

AJ

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do I compile my Java 8 SE code with OpenJDK 11? Eric Douglas <e.d.programmer@gmail.com> - 2019-07-03 12:13 -0700
  Re: How do I compile my Java 8 SE code with OpenJDK 11? Eric Douglas <e.d.programmer@gmail.com> - 2019-07-03 13:49 -0700
    Re: How do I compile my Java 8 SE code with OpenJDK 11? Arne Vajhøj <arne@vajhoej.dk> - 2019-07-03 22:01 -0400
    Re: How do I compile my Java 8 SE code with OpenJDK 11? Eric Douglas <e.d.programmer@gmail.com> - 2019-07-05 06:26 -0700
      Re: How do I compile my Java 8 SE code with OpenJDK 11? Andreas Leitgeb <avl@logic.at> - 2019-08-02 07:00 +0000
        Re: How do I compile my Java 8 SE code with OpenJDK 11? Eric Douglas <e.d.programmer@gmail.com> - 2019-08-02 05:42 -0700
  Re: How do I compile my Java 8 SE code with OpenJDK 11? Andrew J <aj@f-m.fm> - 2019-07-04 01:45 -0400
    Re: How do I compile my Java 8 SE code with OpenJDK 11? Knute Johnson <groups@585ranch.com> - 2019-07-13 14:46 -0500
      Re: How do I compile my Java 8 SE code with OpenJDK 11? Eric Douglas <e.d.programmer@gmail.com> - 2019-07-15 07:09 -0700
        Re: How do I compile my Java 8 SE code with OpenJDK 11? Arne Vajhøj <arne@vajhoej.dk> - 2019-07-15 21:49 -0400

csiph-web