🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #26007

Re: sentencia exec

#26007
From: D. G. Buru
Date: Sat, 13 Feb 1999 00:00
25 lines
1305 bytes

"Mr.IO" escribi�:

> Estoy intentando ejecutar un comando dentro de java, para eso est� el metodo
> Process exec (String).
> Pero no soy capaz, me falta algo como crear un Runtime nuevo, pero no se
> puede,
> si alguien me puede ayudar...

   Process proceso=Runtime.getRuntime().exec (comando);

esto te lanza la excepci�n IOException que tendr�as que recoger para hacer un
c�digo robusto.

Salu2.
--

      ////   /////    /////  //    // /////   //    //
     // //  //       //  // //    // //  //  //    //
    //  // // ///   /////  //    // /////   //    //
   // //  //  //   //  // //    // //  //  //    //
  //// * ////// * /////  //////// //   // ////////

i1437792@petra.euitio.uniovi.es        uov00854@correo.uniovi.es
Technical Details
Message-ID: <36C4B363.BB1623D3@correo.uniovi.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7a1qe4$l2b$1@talia.mad.ttd.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,8ced6cded7c922a5
X-Google-Attributes: gid1116f3,public
From: "D. G. Buru" <uov00854@correo.uniovi.es>
Subject: Re: sentencia exec
Date: 1999/02/13
Message-ID: <36C4B363.BB1623D3@correo.uniovi.es>
X-Deja-AN: 443959141
Content-Transfer-Encoding: 8bit
References: <7a1qe4$l2b$1@talia.mad.ttd.net>
X-Accept-Language: es
Content-Type: text/plain; charset=iso-8859-1
Organization: Telefonica Transmision de Datos
Mime-Version: 1.0
Newsgroups: es.comp.lenguajes.java