Re: [R] Java and R help

From: Mario de Frutos Dieguez <marfru_at_cartif.es>
Date: Wed 06 Jul 2005 - 22:55:23 EST

Mario de Frutos Dieguez escribió:

>Im doing an aplication in Java and i have a program made in R what i
>want to launch with Java.
>
>I have the following instructions:
>
>Runtime r = Runtime.getRuntime();
>
>try
>{
>
> System.out.println ("Llamada a R...");
> p = r.exec(sRutaR);
> }
> catch (IOException e)
> {
> System.out.println ("Error lanzando R: " + e.getMessage());
> e.printStackTrace();
> }
> catch (Exception ex)
> {
> System.out.println ("Error lanzando R!!!! " + ex.toString());
> ex.printStackTrace();
> }
>}
>
>and after that i wait for a file that R must to make called
>terminado.dat. But when i launch the process the file doesn't create
>until i destroy the process.
>
>can anyone explain what's happend with the process?
>
>Thx in advance and sorry for my poor english
>
>______________________________________________
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
>
I think i solve the problem but i dont solve anything hehehe. But i know what's the problem. When i launch the R program like a process it enter in deadlock with the parent thread and dont finish until i stop the main thread.

Anybody has suffer the same nightmare like i? and can help me?

Thx in advance, and sorry for my poor english hehe



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 06 23:01:46 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:16 EST