JDK-8200277 : Compiling native media code fails when using OpenJDK build as boot JDK
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: openjfx11
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-03-26
  • Updated: 2018-06-13
  • Resolved: 2018-03-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx11Fixed
Related Reports
Blocks :  
Relates :  
Description
To reproduce:

1. Set JAVA_HOME to an OpenJDK build (i.e., a JDK that does not have javafx.* modules)

2. Run the following build command:

$ gradle -PCOMPILE_MEDIA=true

3. BUG: This will fail with the following error:

:media:compileToolsJava
.../jfx-dev/rt/modules/javafx.media/src/tools/java/headergen/HeaderGen.java:28: error: package com.sun.media.jfxmedia does not exist
import com.sun.media.jfxmedia.MediaError;
                             ^
.../jfx-dev/rt/modules/javafx.media/src/tools/java/headergen/HeaderGen.java:43: error: cannot find symbol
        for (MediaError error : MediaError.values()) {
                                ^
  symbol:   variable MediaError
  location: class HeaderGen
.../jfx-dev/rt/modules/javafx.media/src/tools/java/headergen/HeaderGen.java:43: error: cannot find symbol
        for (MediaError error : MediaError.values()) {
             ^
  symbol:   class MediaError
  location: class HeaderGen
.../jfx-dev/rt/modules/javafx.media/src/tools/java/headergen/HeaderGen.java:64: error: cannot find symbol
                    String errorFilePath = arg[1] + "/" + MediaError.class.getCanonicalName().replace(".", "/") + ".java";
                                                          ^
  symbol:   class MediaError
  location: class HeaderGen
4 errors

BUILD FAILED in 4m 37s

Comments
Changeset: b956f9ea2553 Author: kcr Date: 2018-03-29 13:04 -0700 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/b956f9ea2553 8200277: Compiling native media code fails when using OpenJDK build as boot JDK Reviewed-by: jvos, prr
29-03-2018

Tested on Linux, the native media code now compiles correctly. Merged by https://github.com/javafxports/openjdk-jfx/commit/ccd5aa2ca090f0844778def02c1c1243c87fb7d4
28-03-2018

Here is a GitHub pull request (I'm doing it there first to test the workflow). https://github.com/javafxports/openjdk-jfx/pull/47 Once the PR is merged into the develop branch, I will send out a review on openjfx-dev
27-03-2018

Both the compileToolsJava and generateMediaErrorHeader tasks need to be fixed to set a proper module path. This was already done for other similar tasks in graphics and controls as part of the fix for JDK-8189111, but was missed for these two media tasks.
26-03-2018