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

AIX: fix charset dependenicies after 8035302:Eliminate dependency on jdk.charsets from 2D font code.



    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • client-libs
    • None
    • b67
    • aix



        Change "8035302:Eliminate dependency on jdk.charsets from 2D font
        code.", along with change "8073152: Update
        Standard/ExtendedCharsets to work with module system" causes build
        failures on AIX.

        It took me some time to dig trough the build system, but I think that
        I at least have a weak understanding of what's going on now:

        So this change removes the dependencies of the 'java.desktop' module
        on the 'jdk.charsets' module or to be more precise, it removes
        'java.desktop's dependency on sun.nio.cs.ext.

        But unfortunately this only works on the current Oracle-supported
        platforms. The following dependencies still exist:

        sun.font.X11GB2312 -> sun.nio.cs.EUC_CN
        sun.font.X11GBK -> sun.nio.cs.GBK
        sun.font.X11KSC5601 -> sun.nio.cs.EUC_KR

        Before this change, the classes X11GB2312, X11GBK and X11KSC5601 were
        located in sun.awt.motif and they imported both "sun.nio.cs.*" and
        "sun.nio.cs.ext.*". After this change, they only import
        "sun.nio.cs.*", so if the required character sets aren’t located in
        the standard charsets package but in the extended one, this won't work
        any more.

        On the Oracle platforms this still works because both Linux and
        Solaris put the corresponding charsets (i.e. X11GB2312, X11GBK and
        X11KSC5601) into the standard charsets package sun.nio.cs by using the
        two configuration files jdk/make/data/charsetmapping/stdcs-linux and
        jdk/make/data/charsetmapping/stdcs-solaris. On MacOS X the build still
        works because the sun.font.* classes are excluded from the
        'java.desktop' module altogether (see java.desktop_EXCLUDE_FILES in

        On AIX the build fails because there the corresponding charsets (i.e.
        X11GB2312, X11GBK and X11KSC5601) are in the extended charsets package
        by default and there's no jdk/make/data/charsetmapping/stdcs-aix
        configuration files which remaps them to "sun.nio.cs.*".

        I can easily fix this by introducing a new
        jdk/make/data/charsetmapping/stdcs-aix configuration file which maps
        X11GB2312, X11GBK and X11KSC5601 to "sun.nio.cs.*" (and I'll do that
        with a follow-up change request to fix the build as soon as possible).

        But still the question remains if this is the "right way" to solve
        this problem? I.e. if some sun.font.XXX classes depend on some
        character sets being in "sun.nio.cs.*", shouldn't this be ensured
        automatically without the need of keeping some per-platform
        configuration files up to date?

        And what is actually the exact semantics of the "stdcs-solaris" and
        "stdcs-linux" files? For example it seems strange to me that
        "JIS_X_0212_Solaris" is made a standard charset on Linux. As far as I
        can see, it is enough to move the three charsets EUC_CN, GBK and
        EUC_KR to "sun.nio.cs.*" in order to satisfy the new build

        So maybe we should just declare this correctly right in the
        "jdk/make/data/charsetmapping/charsets" file or otherwise have a
        special "stdcs-REQUIRED" file for these three charsets and leave the
        platform dependent files for _real_ platform specific customizations.
        What do you think?


          Issue Links



                simonis Volker Simonis
                simonis Volker Simonis
                0 Vote for this issue
                2 Start watching this issue