Incorrect error message during startup if working directory does not exist

XMLWordPrintable

    • b16
    • aarch64
    • os_x

        When I start java on my Macbook after the current working directory has been deleted, the VM crashes during inizialization with the message: "java.lang.InternalError: platform encoding not initialized".

        How to reproduce:

        % mkdir test
        % cd test
        % rmdir ../test
        % java
        Error occurred during initialization of VM
        java.lang.InternalError: platform encoding not initialized
        at jdk.internal.util.SystemProps$Raw.platformProperties(java.base@23-ea/Native Method)
        at jdk.internal.util.SystemProps$Raw.<init>(java.base@23-ea/SystemProps.java:263)
        at jdk.internal.util.SystemProps.initProperties(java.base@23-ea/SystemProps.java:67)
        at java.lang.System.initPhase1(java.base@23-ea/System.java:2165)

        I reproduced this with OpenJDK 21.0.3 as well as recent 23 and 24 builds on macOS 14.5 and 14.6.1. It doesn't happen on my Linux laptop.

              Assignee:
              Justin Lu
              Reporter:
              Hannes Wallnoefer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: