From simon.urbanek at r-project.org  Sun Dec 30 20:19:47 2007
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Sun, 30 Dec 2007 14:19:47 -0500
Subject: [Rd] some questions about startup Rserve
In-Reply-To: <bf5481070712292123n11bda784k3fbd84e4cdeb4452@mail.gmail.com>
References: <bf5481070712292123n11bda784k3fbd84e4cdeb4452@mail.gmail.com>
Message-ID: <EA400CF9-6D57-4A2B-8CC4-B0986BC12F46@r-project.org>


On Dec 30, 2007, at 12:23 AM, ??? wrote:

>    I realize the communication between R and Java with Rserve in my
> dissertation, but i can not run the Rserve by double click of  
> Rserve.exe,

Use
library(Rserve)
Rserve()
instead. You need to setup PATH correctly in order to run it manually  
- please read the documentation it is explained there:
http://www.rforge.net/Rserve/doc.html


> and also i can't realize backstage running of Rserve by technique of
> Multi-thread in Java. Can anyone tell me why?

Windows doesn't have fork(), so you cannot have more than one session  
in one Rserve in Windows. Use of a unix computer as a server is highly  
recommended as that allows arbitrarily many connections in parallel  
with almost zero startup overhead. On Windows you can still spawn  
multiple Rserve instances in parallel, but make sure you're not trying  
to connect to the same instance twice.


>    So, before i run the Java, i must run the R manually, then input
> "Rserve()" or "system("Rserve")". This results in the incompactness  
> of my
> software architecture.In order to solve this problem, i have tried  
> many
> method.

Again - just read the documentation - all you need is correctly  
installed R and R.dll on your PATH.


> For example, i tried to input "Rserve()" to the .Rprofile of R, but
> when i run the R, hundreds of processes were started, then my computer
> system was down. would anyone help me to solve this problem?

Cheers,
Simon

PS: Please use stats-rosuda-devel mailing list for questions on  
Rserve, JGR, rJava etc.



[Rd] some questions about startup Rserve
Simon Urbanek