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

javac cannot find non-ASCII module name under non-UTF8 environment

XMLWordPrintable

    • b05
    • x86_64
    • windows

        FULL PRODUCT VERSION :
        openjdk version "14-ea" 2020-03-17
        OpenJDK Runtime Environment (build 14-ea+17-721)
        OpenJDK 64-Bit Server VM (build 14-ea+17-721, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        Windows Server 2016 Japanese

        A DESCRIPTION OF THE PROBLEM :
        Under Japanese Windows environments, Japanese name module cannot be handled.
        Compiling and executing are OK, but referencing the module by javac with "--add-modules" option failed.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Extract the attached JapaneseNameTest.zip.
        Only "moduel-info.java" in the zip file has Japanese string for module name.
        The module name is "Hiragana letter A", U+3042, plus "_module".

        Execute the following command under Japanese environment.
        > javac -d mod1 -encoding utf-8 ABC.java module-info.java
        > java -p mod1 --module あ_module/test.isel.ABC
        ABC:main
        ABC:method1
        > javac -p mod1 --add-modules あ_module test0.java
        error: module not found: あ_module
        1 error
        > java -p mod1 --describe-module あ_module
        ??_modu not found

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ADDITIONAL INFORMATION:
        Linux environments don't have this problem, since it's UTF-8 encoding.

              tnakamura Toshio Nakamura
              tnakamura Toshio Nakamura
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: