Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: process control

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Arrow process control

    Is it possible to control processes running ina system? i know its is difficult or not at all possible to control OS's processes. Atleast is there any way to control processes like vlc.exe, iexplorer.exe,etc.? I need to pause, resume and terminate the processes at my will.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: process control

    Yes, but I would advise strongly against it. Pausing/resuming/terminating another processes, especially if you did not create the process to be acted upon, is extremely prone to memory leaks and severe data corruption. Why would you want to do something like this?

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: process control

    actually i have to create a list of all currently running processes. if a new process is started, it must be automatically paused and wait for user authentication. if user clicks OK, it should run, if user clicks NO, the process must be terminated.How for this is possible?

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: process control

    I'd say this will be rather hard using pure Java.

    // Json

  5. #5
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: process control

    I'd say it was impossible in pure Java... Java can't "impede" on another process on it's own since it has no way of getting the memory pointer for that process, and also because doing this is highly platform dependent. The way to go with this is probably C/C++, and maybe use JNI if you want an easy to create GUI in Java.

  6. #6
    Junior Member
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: process control

    ok thank u for all ur help

  7. #7
    Junior Member
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: process control

    Try doing some stuffs with the java.lang.Runtime. it has a getRuntime class and exec() method.

Similar Threads

  1. Replies: 8
    Last Post: April 21st, 2013, 08:20 AM
  2. Patch Process
    By Drakenmul in forum Java Theory & Questions
    Replies: 3
    Last Post: August 2nd, 2009, 03:09 AM
  3. How can i control keyboard through programming?
    By Mohd in forum Java Theory & Questions
    Replies: 3
    Last Post: January 5th, 2009, 07:10 AM

Tags for this Thread