[Remoterengine-devel] Launcher class checked in
Romain Francois
romain.francois at dbmail.com
Wed Oct 28 12:32:21 CET 2009
Now I finally had the time to at least look at the launcher.
On linux, you need to set the LD_LIBRARY_PATH environment variable,
which is different from the java.library.path property, otherwise jri
won't load. setting java.library.path is not enough because the
information is used by the linker and not by java itself.
I don't think calling System.setProperties( systemProps ) works anyway
to set environment variables as it looks you intend to do. I think we
need to use ProcessBuilder instead.
This is on my list for this afternoon.
On 09/28/2009 08:48 PM, Romain Francois wrote:
>
> On 09/28/2009 08:43 PM, Ian Long wrote:
>>
>> Romain Francois wrote:
>>> On 09/28/2009 08:08 PM, Ian Long wrote:
>>>>
>>>> Hi,
>>>>
>>>> I have started work on and checked in a class that will launch the
>>>> REngineServer. The Launcher requires JAVA_HOME and R_HOME environment
>>>> variables to be set and uses these to build up the remainder of the
>>>> information required to launch the REngineServer - normally this is
>>>> performed by the "remoterengine" script within the exec directory.
>>>>
>>>> The goals of this script are to:
>>>>
>>>> 1. enable additional System properties to be set in the JVM running
>>>> the server
>>>> 2. simplify the start up process
>>>> 3. make it easier to run the server in a debugger
>>>> 4. make it easier to run test harnesses around the server
>>>>
>>>> The script is mostly self-contained, the more interesting of the command
>>>> line options that it takes are:
>>>> -h Prints out a help message
>>>> -v Verbose mode
>>>> -t Test mode - doesn't try to run the server, builds the environment
>>>> list and writes it out to StdOut - also writes out a local file called
>>>> "launchcommand.txt" containing the command the Launcher would try to
>>>> execute in order to start the server.
>>>>
>>>> For example:
>>>>> java -cp RemoteREngine-server.jar
>>>> org.rosuda.REngine.remote.common.Launcher -h
>>>> org.rosuda.REngine.remote.common.Launcher command line options:
>>>> Launcher -v -h -b path -c class -XMemoryDefinition<System Properties>
>>>> -h: Print this menu
>>>> -v: Verbose mode; default false
>>>> -X: Java process memory defintion; default mx1024M
>>>> -b: Path to root of class files (instead of
>>>> RemoteREngine-server.jar file
>>>> -c: Class to be launched; default
>>>> org.rosuda.REngine.remote.server.REngineServer
>>>> -D<propertyname>=<propertyvalue>: Set System property
>>>> -t: Test mode - write out the launch command but do not execute it
>>>>
>>>> The Launcher works on Windows but currently is having issues on Linux.
>>>> The command written out to launchcommand.txt works, however the
>>>> interactive launch of the server does not - R generates a fatal error:
>>>> "Fatal error: you must specify '--save', '--no-save' or '--vanilla'"
>>>>
>>>> Cheers,
>>>> Ian.
>>>
>>> Thanks for this. I'll test on linux tomorrow. --save, --no-save or
>>> --vanilla are typically one of the String you give to one of the
>>> constructor of JRIEngine.
>>>
>>> Romain
>>>
>> The call within RemoteREngine_Server that fires up the JRIEngine has the
>> args set to null, so unfortunately I still struggling to understand the
>> reason for this.
>>
>>
>
> Maybe using new String[] { "--vanilla" } would work. I'll test tomorrow.
>
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/BcPw : celebrating R commit #50000
|- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
`- http://tr.im/yw8E : New R package : sos
More information about the Remoterengine-devel
mailing list