Revision: 3117
          http://vexi.svn.sourceforge.net/vexi/?rev=3117&view=rev
Author:   mkpg2
Date:     2008-09-24 18:01:36 +0000 (Wed, 24 Sep 2008)

Log Message:
-----------
Test for process exiting.

Removed Paths:
-------------
    trunk/core/org.vexi.devl/src/org/vexi/process/VexiProcess.java

Deleted: trunk/core/org.vexi.devl/src/org/vexi/process/VexiProcess.java
===================================================================
--- trunk/core/org.vexi.devl/src/org/vexi/process/VexiProcess.java      
2008-09-24 16:31:05 UTC (rev 3116)
+++ trunk/core/org.vexi.devl/src/org/vexi/process/VexiProcess.java      
2008-09-24 18:01:36 UTC (rev 3117)
@@ -1,77 +0,0 @@
-package org.vexi.process;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.ibex.util.Log;
-
-public class VexiProcess {
-       
-       final String[] vexipath;
-       
-       
-       public VexiProcess(String[] vexipath){
-               this.vexipath = vexipath;
-       }
-       
-       
-       public void launch(final Console console) throws IOException{
-               // REMARK - do we have to run in a separate JVM? Should this be 
optional?
-               String[] command_noargs =
-                       new String[]{"java","-cp", 
System.getProperty("java.class.path"), 
-                               "org.vexi.core.Main"};
-               String[] command = new String[command_noargs.length + 
vexipath.length];
-               System.arraycopy(command_noargs, 0, command, 0, 
command_noargs.length);
-               System.arraycopy(vexipath, 0, command, command_noargs.length, 
vexipath.length);
-               
//,"/home/mike/eclipse/vexi2/org.vexi.debugclient/vexi/debugger","/home/mike/eclipse/vexi2/org.vexi.debugclient/vexi/widgets/src"};
-               
-               Log.uInfo(VexiProcess.class, "Launching command: ");
-               String commandStr = "";
-               for(int i=0; i<command.length; i++) commandStr+=command[i]+" ";
-               Log.uInfo(VexiProcess.class, commandStr);
-               Process proc = Runtime.getRuntime().exec(command);
-       
-               // subprocess' output stream
-               new StreamGobbler(proc.getInputStream()){
-                       void gobble(String line) {
-                               console.appendOut(line);
-                       }
-                       
-               }.start();
-               // subprocess' error stream
-               new StreamGobbler(proc.getErrorStream()){
-                       void gobble(String line) {
-                               console.appendOut(line);
-                       }
-                       
-               }.start();
-               
-               
-    }
-       
-       
-       
-       abstract public class StreamGobbler extends Thread {
-               InputStream is;
-               
-               public StreamGobbler(InputStream is) { this.is = is; }
-               
-               public void run()
-               {
-                       try
-                       {
-                               InputStreamReader isr = new 
InputStreamReader(is);
-                               BufferedReader br = new BufferedReader(isr);
-                               String line=null;
-                               while ( (line = br.readLine()) != null) 
gobble(line);
-                       } catch (IOException ioe)
-                       {
-                               ioe.printStackTrace();  
-                       }
-               }
-               
-               abstract void gobble(String line);
-       }
-}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to