CarlosF10 de Diciembre del 2005
PreguntaHola, tengo este problema: tengo que ejecutar un comando desde java en linux, ya lo he echo en windows y si funciona, pero al hacerlo en linux no se si sirva por que al ejecutar la clase no sale ningun resultado en consolo. Esta es mi clase :
import java.util.*;
import java.net.*;
import javax.swing.*;
class Prueba
{ public Prueba()
{
try
{
Runtime rt= Runtime.getRuntime();
Process proc = rt.exec("ps");
}
catch (Exception o){System.out.println(o);}
}
public static void main (String args [])
{ Prueba p;
p = new Prueba();
}
}
Ojala alguien pueda ayudarme por please.....:p
import java.util.*;
import java.net.*;
import javax.swing.*;
class Prueba
{ public Prueba()
{
try
{
Runtime rt= Runtime.getRuntime();
Process proc = rt.exec("ps");
}
catch (Exception o){System.out.println(o);}
}
public static void main (String args [])
{ Prueba p;
p = new Prueba();
}
}
Ojala alguien pueda ayudarme por please.....:p
