Ohhhhh yeahh
OK. I make that it works but the I found another problem. I need to run
class form another directories, and I have to put in the call the classpath
of the class that I want to run.
I make that it works in this way:

public static void main(String args[]) {

                        Runtime runtime = Runtime.getRuntime();
                        Process process = null;
                        String Str_argumentos = "";

                        Str_argumentos=System.getProperty("java.class.path");

                        try {

                                        process = runtime.exec("c:/jdk1.2.2/bin/java 
-classpath
"+Str_argumentos+";C:/Temporal/ProcesosBatch Mensajeria");

                                        DataInputStream in = new DataInputStream
(process.getInputStream());
                                        String line=null;
                                        while ((line=in.readLine()) != null) {
                                                System.out.println (line);
                                        }
                        }
                                catch (Exception e) {

                                        System.out.println ("No puedo ejecutar la 
tarea: ");

                                        System.out.println (e);


                                }

        }//


Thanks

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to