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

java/lang/ProcessHandle/InfoTest.java failed Cannot run program "whoami"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b68
    • CPU:
      generic
    • OS:
      solaris

      Backports

        Description

        This has been seen on Solaris 10 x64 environment.
        According with the test output, it looks to need "whoami".
        ----------System.err:(29/1589)----------
        java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:286)
        at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:155)
        at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:147)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:502)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
        at java.lang.Thread.run(Thread.java:745)
        Caused by: java.lang.RuntimeException: java.io.IOException: Cannot run program "whoami": error=2, No such file or directory
        at InfoTest.<clinit>(InfoTest.java:68)
        ... 10 more
        Caused by: java.io.IOException: Cannot run program "whoami": error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1056)
        at InfoTest.<clinit>(InfoTest.java:61)
        ... 10 more
        Caused by: java.io.IOException: error=2, No such file or directory
        at java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:315)
        at java.lang.ProcessImpl.start(ProcessImpl.java:264)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1035)
        ... 11 more

        On SOlaris, whoami is under /user/ucb/, which could be not in the PATH by default. There is another choice is 'who am i'. '/bin/who' is usually in PATH.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rriggs Roger Riggs
                  Reporter:
                  xiaofeya Xiaofeng Yang
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: