source code of process.java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chalani
    New Member
    • Jan 2008
    • 1

    source code of process.java

    Hi...

    I was unable to find the implementation of process.java. What i need is the implementation of waitFor() method of process.java. but at every place what i find is the abstract class. could any of you send me an implementation code of the process.java

    thnkx...
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by chalani
    Hi...

    I was unable to find the implementation of process.java. What i need is the implementation of waitFor() method of process.java. but at every place what i find is the abstract class. could any of you send me an implementation code of the process.java

    thnkx...
    Check your JDK installation directory. There's usually a zipped file containing the sources of the standard Java classes.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by r035198x
      Check your JDK installation directory. There's usually a zipped file containing the sources of the standard Java classes.
      The source of that part isn't there: when you drill down the Process class you'll
      end up in the ProcessImpl class that has a native 'create()' method that actually
      creates another process for you through a 'priviledged' action. It's all C and/or
      C++ down there (which doesn't surprise me).

      kind regards,

      Jos

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by JosAH
        The source of that part isn't there: when you drill down the Process class you'll
        end up in the ProcessImpl class that has a native 'create()' method that actually
        creates another process for you through a 'priviledged' action. It's all C and/or
        C++ down there (which doesn't surprise me).

        kind regards,

        Jos
        How did you get to the ProcessImpl class?

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by r035198x
          How did you get to the ProcessImpl class?
          I took this route: Runtime.exec() calls a ProcessBuilder which calls a ProcessImpl.

          kind regards,

          Jos

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by JosAH
            I took this route: Runtime.exec() calls a ProcessBuilder which calls a ProcessImpl.

            kind regards,

            Jos
            And that indeed is it.Hopefully the OP won't ask us where to get the C/C++ codes for that.

            Comment

            • BigDaddyLH
              Recognized Expert Top Contributor
              • Dec 2007
              • 1216

              #7
              Why do you need to see the implementation? Isn't consulting the API enough?

              Comment

              Working...