Results 1 to 2 of 2
  1. #1
    egran001 is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Runtime Processes

    I create a process that opens an xterm window, changes directories, and executes a script found in the directory. The following code is how I've accomplished this and it works fine. I was curious if there is an easy way that I can access the existing process later on to write out a command to the existing xterm window. or... perhaps someone has a better idea of how to accomplish something like this.

    Here is the code that I'm using to create the process:
    Java Code:
    Process process = null;
    try {
    	String command= "xterm -e 'cd $LOCATION/src/myscript/; ./script; bash'";
    	Runtime rt = Runtime.getRuntime();
    	process = rt.exec(new String[] {"bash", "-c", command});
    } catch (IOException e) {
    	e.printStackTrace();
    }
    Thanks!
    Eric

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,305
    Rep Power
    20

    Default Re: Runtime Processes

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Monitoring processes
    By scamiolo in forum New To Java
    Replies: 3
    Last Post: 07-20-2011, 01:38 PM
  2. how to run parallel processes ?
    By mapred.learn in forum New To Java
    Replies: 2
    Last Post: 03-02-2011, 12:45 AM
  3. Replies: 22
    Last Post: 09-06-2009, 05:21 PM
  4. Halt applet processes.
    By barusk in forum Java Applets
    Replies: 1
    Last Post: 04-06-2009, 05:11 PM
  5. netbeans processes don´t die
    By karlen in forum NetBeans
    Replies: 0
    Last Post: 06-11-2007, 09:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •