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

tools/launcher/I18NArgTest.java fails on Japanese Windows environment

    XMLWordPrintable

Details

    • b17
    • generic
    • generic

    Backports

      Description

        tools/launcher/I18NArgTest.java runs only on Japanese Windows environment. But this test fails with following output:

        ++++Test Output++++
          NOTE: Picked up JDK_JAVA_OPTIONS: -Dtest.src=C:\\Users\\clouduser\\git\\openjdk_build\\test\\jdk\\tools\\launcher -Dtest.classes=C:\\Users\\clouduser\\git\\tmp\\JTwork\\classes\\tools\\launcher\\I18NArgTest.d -cp C:\\Users\\clouduser\\git\\tmp\\JTwork\\classes\\tools\\launcher\\I18NArgTest.d I18NArgTest "?\\" 30bd
          Error: Cannot specify main class in environment variable JDK_JAVA_OPTIONS
        ++++Test Stack Trace++++
        java.lang.Throwable: current stack of the test
          TestHelper.doExec(TestHelper.java:480)
          TestHelper.doExec(TestHelper.java:445)
          I18NArgTest.execTest(I18NArgTest.java:105)
          I18NArgTest.execTest(I18NArgTest.java:53)
          I18NArgTest.main(I18NArgTest.java:45)
          java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
          java.base/java.lang.reflect.Method.invoke(Method.java:578)
          com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
          java.base/java.lang.Thread.run(Thread.java:1596)
        ++++End of Test Info++++

        This test specifies JDK_JAVA_OPTIONS environment variable with main class. But now, JDK_JAVA_OPTIONS is not
        allowed including main class as described below.
        https://docs.oracle.com/en/java/javase/18/docs/specs/man/java.html#using-the-jdk_java_options-launcher-environment-variable

        In order to mitigate potential misuse of JDK_JAVA_OPTIONS behavior, options that specify the main class (such as -jar)
        or cause the java launcher to exit without executing the main class (such as -h) are disallowed in the environment variable.
        If any of these options appear in the environment variable, the launcher will abort with an error message.

        So, I would like to remove this test section.

        Attachments

          Issue Links

            Activity

              People

                tkiriyama Takuya Kiriyama
                tkiriyama Takuya Kiriyama
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: