JDK-8097261 : Webkit build failure caused by RT-40000
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: 8u60
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-02-07
  • Updated: 2015-06-26
  • Resolved: 2015-02-07
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.
JDK 8
8u60Fixed
Related Reports
Relates :  
Relates :  
Description
RT-40000 refactored some classes to avoid split packages, and also moved com/sun/webkit/dom/JSObject.java from the graphics module (where it doesn't belong) to the web module. This works fine when not building webkit (which is the default), but causes the build to fail when webkit is built with the following error:

javah -J-Djava.ext.dirs= -d rt/modules/web/build/generated-src/headers -classpath rt/modules/web/build/classes/main:rt/modules/graphics/build/classes/main java.lang.Character java.net.IDN com.sun.webkit.ContextMenu com.sun.webkit.ContextMenuItem com.sun.webkit.CursorManager com.sun.webkit.PageCache com.sun.webkit.PopupMenu com.sun.webkit.SharedBuffer com.sun.webkit.WatchdogTimer com.sun.webkit.WebPage com.sun.webkit.LoadListenerClient com.sun.webkit.event.WCFocusEvent com.sun.webkit.event.WCKeyEvent com.sun.webkit.event.WCMouseEvent com.sun.webkit.event.WCMouseWheelEvent com.sun.webkit.graphics.GraphicsDecoder com.sun.webkit.graphics.RenderMediaControls com.sun.webkit.graphics.RenderTheme com.sun.webkit.graphics.ScrollBarTheme com.sun.webkit.graphics.WCMediaPlayer com.sun.webkit.graphics.WCGraphicsManager com.sun.webkit.graphics.WCRenderQueue com.sun.webkit.graphics.WCPath com.sun.webkit.graphics.WCPathIterator com.sun.webkit.Timer com.sun.webkit.WCFrameView com.sun.webkit.WCPasteboard com.sun.webkit.WCPluginWidget com.sun.webkit.dom.JSObject com.sun.webkit.network.SocketStreamHandle com.sun.webkit.network.URLLoader com.sun.webkit.text.TextBreakIterator com.sun.webkit.text.TextNormalizer
Successfully started process 'command 'javah''
Error: Could not find class file for 'com.sun.webkit.dom.JSObject'.
Process 'command 'javah'' finished with exit value 1 (state: FAILED)
:web:generateHeaders FAILED
:web:generateHeaders (Thread[main,5,main]) completed. Took 0.52 secs.

Comments
http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/adae30a7fe1e
07-02-2015

The reason for this is that when webkit is built, by specifying "-PCOMPILE_WEBKIT=true", the modules/web/src/main/java/com/sun/webkit/dom/*.java is excluded from the build with the following logic: if (IS_COMPILE_WEBKIT) { // These classes will be generated by native build sourceSets.main.java.exclude("com/sun/webkit/dom/**") } Instead, these files are generated by the webkit native code (without JSObject.java which is not a generated file), and compiled later. So the existing modules/web/src/main/java/com/sun/webkit/dom/ directory is really just a stub directory intended to allow the build to run and generate all the class files even when not building webkit. Given this, it is wrong for these stubs to be in the src/main/java tree. The right solution is to move all of the stubs to a suitably named directory (e.g., src/main/java-stubs) that will be included when not building webkit. Then we will stop excluding modules/web/src/main/java/com/sun/webkit/dom/ which will only contain JSObject.java. This is a much less fragile solution than the current. Since the build is broken and needs to be fixed for our weekly integration, I will fix the build failure by reverting the part of RT-40000 that moved com/sun/webkit/dom/JSObject.java from graphics to web (part 3 of RT-40000), and file a new JIRA to redo that part of the fix as described in the preceding paragraph.
07-02-2015