search for: getruntime

Displaying 20 results from an estimated 27 matches for "getruntime".

2013 Nov 11
2
problem using rJava with parallel::mclapply
...e process hangs forever. Martin Studer, the maintainer of XLConnect kindly investigated the issue, identified rJava as a possible cause of the problem: This does not work (hangs): library(parallel) require(rJava) .jinit() res <- mclapply(1:2, function(i) { J("java.lang.Runtime")$getRuntime()$gc() 1 }, mc.cores = 2) but this works: library(parallel) res <- mclapply(1:2, function(i) { require(rJava) .jinit() J("java.lang.Runtime")$getRuntime()$gc() 1 }, mc.cores = 2) To cite Martin, it seems to work with mclapply when the JVM process is initialized after...
2008 Oct 31
2
Problem of running R console from Java on linux box
Hi the list: I can not create R process from Java application with my linux box, the process never was created, or just terminated immediately after I called Runtime.getRuntime().exec(...) The command lines I have tried are(the paths are all correct): "/bin/sh /usr/bin/R" "/bin/sh -c /usr/bin/R" "/usr/lib/R/bin/exec/R"(also set R_HOME=/usr/lib/R) I also tried ProcessBuilder, which is no help. I'm confused, is this possible?...
2005 Jul 05
2
Java and R help
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...
2004 Apr 21
2
calling R from java
Hello, I need to call R from a java(swing) application. I manage to do it with something like : Process p = Runtime.getRuntime().exec("R --slave") OutputStreanWriter o = new OutputStreamWriter(p.getOutputStream()) o.wrote("...") ... etc but at the end no .Rdata file has been created and there are some data I don't want to reload each time (for time execution reasons). So, Is it possible when callin...
2003 Nov 12
1
Talk with from Java
...ava.io.*; /** * * @author markus */ public class Java_R { /** Creates a new instance of Java_R */ public Java_R() { } /** * @param args the command line arguments */ public static void main(String[] args) { try { Process process = Runtime.getRuntime().exec("R --no-save"); //Process process = Runtime.getRuntime().exec("R --help"); BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())); BufferedReader reader = new BufferedReader(new java....
2006 Sep 05
1
Reserve and biobase
...ibrary, a new Graphics window frame pops up. Could any onw know how can avoid it. Best Saeede class testReserve { public static void main(String[] args) { RServeConnection rsCon = null; Rconnection c = null; Process proc = null; try { Runtime rt = Runtime.getRuntime(); proc = rt.exec(generalMetaData.rserveDir); try { c = new Rconnection(); c.eval("library(grDevices)"); // c.eval("graphics.off()"); c.eval("postscript()"); //load library c.eval("library(tools)");...
2009 Mar 25
1
Pipe creation problem: From Java app using rsync + ssh on windows with cygwin
...m java on windows vista with cygwin installed. Its strange as pasting the exact same command into a command shell works fine. My test java call looks like this. * String[] envVars = {"PATH=c:/cygwin/bin;%PATH%"}; File workingDir = new File("c:/cygwin/bin/"); Process p = Runtime.getRuntime().exec("c:/cygwin/bin/rsync.exe -verbose -r -t -v --progress -e ssh /cygdrive/c/Users/dokeeffe/workspace/jrsync/ www.servername.net:/home/dokeeffe/rsync/",envVars,workingDir); * Then I start 2 stream reader threads to capture and log the inputStream and errorStream of the Process p. Here...
2004 Nov 19
0
[AustinJUG] Problem calling rsync from java on OSX
...; String[] commands = new String[] { > "/Users/dlippolt/.azerup/rsync", > "--daemon", > "--config=/Users/dlippolt/.azerup/rsyncd.conf", > "--port=2874" > }; > Process child = Runtime.getRuntime().exec(commands); > } catch (IOException e) { > System.err.println (e); > } > >-damon > >--- Drew Lippolt <lists-rsync@azera.net> wrote: > > > >>rsync and ajug lists, >> >>been pulling my hair out on this one. >> >>i ha...
2005 Aug 16
4
Image from bytes streams
Hello! I'm trying to get an array of bytes from graphic images generated by R. Here, you can see my Java code: -------------------------------------------------------------------------------------------------------------------------- Process p = Runtime.getRuntime().exec("C:/Arquivos de programas/R/rw1090/bin/Rterm.exe --no-save"); DataOutputStream output = new DataOutputStream(new BufferedOutputStream(p.getOutputStream())); DataInputStream input = new DataInputStream(new BufferedInputStream(p.getInputStream())); // output.writeBytes("pie(c...
2009 Dec 09
2
[LLVMdev] How to run vmjc created .bc files?
...bpthread.so.0 #14 0xf4011e7e in clone () from /lib/libc.so.6 The java file itself is very simple: public class NumProcs { /** * Displays the number of processors available in the Java Virtual Machine */ public static void main(String[] args) { Runtime runtime = Runtime.getRuntime(); int nrOfProcessors = runtime.availableProcessors(); System.out.println("Number of processors available to the Java Virtual Machine: " + nrOfProcessors); } } I just updated to the latest revision in svn. Michael nicolas geoffray wrote: > Hi Michael, > &gt...
2007 Aug 21
0
Need help on making speex AEC to work
...s); // this is just for local playback, a demo only speexDecode(bytes, c); p.write(bytes, 0, length); // THIS IS WHERE A FRAME WAS WRITTEN FOR PLAYBACK } }); p.start(); r.start(); Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { speexDestroy(); } }); _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.liv...
1999 Oct 06
1
Java interface to R
I have been doing some programming with java servlets for data collection. I was wondering if there is a way to connect to the R-server using java to do data analysis. A java-interface or some connection class. I think there is some similar facility with SAS, although I have not looked at it. Richard Piper RNS Hospital, Sydney.
2002 Nov 14
0
exec-ing R from Java
I'm developing a Java module which exec's R by means of the java.lang.Runtime class. R is started from Java with code similar to p = Runtime.getRuntime().exec("/usr/bin/R --no-save"); Java then controls R by sending and receiving messages over R's STDIN and STDOUT. This works well except when plots are displayed to the screen. The windows are non interactive. They don't redraw themselves if they resided, icon-ized , or obscured...
2002 Nov 21
0
Calling R from Java
...I've heard you should use SJava). Here are other alternatives that are easy to implement and that you should consider depending on what you want to do: 1- one is to use R in batch mode ie you create a file in your java code with all the R commands and send it to R (via Process pc=Runtime.getRuntime().exec(Rcall); )and then R creates an outputfile with all the results. The matter with this is that there is no interactivity, variables are not kept, you have to parse the outputfile, ... (see the above article (see ? FFinterface)) 2- another one is to use the R server developed by Simon Urban...
2009 Jun 12
0
JRclient.RSrvException Exception: Handshake
...Message().equals("Cannot connect: Connection refused")) { try { String rserveStartCommand = "R CMD Rserve --vanilla"; //do a blocking call to the shell command for starting Rserve int exitValue = Runtime.getRuntime().exec(rserveStartCommand).waitFor(); //if it returned success, try connecting again if (exitValue == 0) return new Rconnection(); //otherwise, Rserve is probably not installed else...
2006 Jul 07
0
Calling R from Java
...////////////////////////////////////// Here are other alternatives that are easy to implement and that you should consider depending on what you want to do: 1- one is to use R in batch mode ie you create a file in your java code with all the R commands and send it to R (via Process pc=Runtime.getRuntime().exec(Rcall); )and then R creates an outputfile with all the results. The matter with this is that there is no interactivity, variables are not kept, you have to parse the outputfile, ... (see the above article (see ยง FFinterface)) 2- another one is to use the R server developed by Simon Urban...
2006 Jul 09
0
R
Madame, I've read your answer for using R from Java, you've sais: one is to use R in batch mode ie you create a file in your java code with all the R commands and send it to R (via Process pc=Runtime.getRuntime().exec(Rcall); )and then R creates an outputfile with all the results. My question is how to do a process in Java and do I need to change the path of Java or R to let Java call R, What configuration should I do??? and Do I need to add somehting to a Java program ??? Thank you in advance...
2006 Jul 10
0
Starting Rserve in Java using Runtime Failed
I have tried using the following piece of Java code to start Rserve on my Linux PC without success. try { String command = "R CMD Rserve "; Process p = Runtime.getRuntime().exec(command); returnCode = p.waitFor(); if (returnCode != 0) { errorMessage = "Unexpected return code = " + returnCode; } } catch (Exception e) { errorMessage = "Exception in running :" + e; } I did not get any non-zero return code or error message. It works when I run...
2006 Jan 13
1
Cepstral in AGI problem
I'm expirimenting with Cepstral via swift.agi. It loads w/ no problem, but there is a fairly long separation between words -- almost as if it is processing one word at a time, rather than stringing a phrase together. When I run cepstral with a similar script, but not through an actual call from asterisk the separation between words is short and natural. I'd really appreciate
2004 Apr 22
0
calling R from java[Scanned]
..., > -tony > > > "anthony.ferrari at ensimag.imag.fr" <ferraria at ensisun.imag.fr> writes: > > > Hello, > > > > I need to call R from a java(swing) application. I manage to do it with > > something like : > > > > Process p = Runtime.getRuntime().exec("R --slave") > > OutputStreanWriter o = new OutputStreamWriter(p.getOutputStream()) > > o.wrote("...") > > ... etc > > > > but at the end no .Rdata file has been created and there are some data I > > don't want to reload each time (...