Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. detect runtime process

detect runtime process

Scheduled Pinned Locked Moved C#
questionjavaxml
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    azusakt
    wrote on last edited by
    #1

    Dear All, I have to execute a java application from C-sharp, but I want to know, how can I detect whether the process is complete or not? System.Diagnostics.Process.Start("/MySetup.jar", "untitled.xml"); the code I used as above. and I will have to do another function after the MySetup.jar is ended. Can anyone give me some hints? Thanks

    S 1 Reply Last reply
    0
    • A azusakt

      Dear All, I have to execute a java application from C-sharp, but I want to know, how can I detect whether the process is complete or not? System.Diagnostics.Process.Start("/MySetup.jar", "untitled.xml"); the code I used as above. and I will have to do another function after the MySetup.jar is ended. Can anyone give me some hints? Thanks

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      Process process = Process.Start("/MySetup.jar", "untitled.xml");
      process.WaitForExit();
      anotherFunction();


      www.troschuetz.de

      A 1 Reply Last reply
      0
      • S Stefan Troschuetz

        Process process = Process.Start("/MySetup.jar", "untitled.xml");
        process.WaitForExit();
        anotherFunction();


        www.troschuetz.de

        A Offline
        A Offline
        azusakt
        wrote on last edited by
        #3

        Thanks so much stefan. Just have another question, do I need to call dispose or close after the process ended? e.g process.dispose(), process.Close(); And, it looks difficult to lock the original application after running this process. Because I don't want to let user do anything after popup this process.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups