Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8187599

Remove dependency of Building Nimbus L&F on JAXB

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • 10
    • client-libs

      JDK 9 has deprecated for removal all the EE modules including under this
      ID : https://bugs.openjdk.java.net/browse/JDK-8181702, the JAXB APIs.

      The building of Nimbus L&F uses this during the build process to
      process a file skin.laf
      NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf

      So we need to remove the dependency in an upcoming release before
      the removal happens.

      The parsing is done by code below found in the file
      jdk/make/src/classes/build/tools/generatenimbus/Generate.java

                  JAXBContext ctx = JAXBContext.newInstance("build.tools.generatenimbus");
                  Unmarshaller u = ctx.createUnmarshaller();
                  SynthModel model = (SynthModel) u.unmarshal(skinFile);


      This is invoked from make/gensrc/GenSrcSwing.gmk

      There are 3 options I can think of
      (1) Import a parser into JDK to parse the skin.laf
      (2) Add a new build tool dependency which is an external JAXB implementation
      (3) Remove the build dependency by saving the generated source files
      and checking them into the repository

      That last option seems like the least work and risk.
      The build time generation was useful when the skins were being updated
      during development but they are never (or almost never) updated any more
      and SFAIK is is all cross-platform so building once should suffice.

      The Generate tool should remain but used only by a script which relies
      on an external JAXB implementation for that rare case the skin needs
      to be re-generated.

      This might even speed up the build a little ..

            ssadetsky Semyon Sadetsky (Inactive)
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: