[Rd] some questions about startup Rserve
Simon Urbanek
simon.urbanek at r-project.org
Sun Dec 30 20:19:47 CET 2007
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.
More information about the R-devel
mailing list