[R] running SJava

Stephen C. Upton upton at mitre.org
Thu Aug 29 04:02:11 CEST 2002


Having problems getting started with SJava and request help.

I get this error when running .JavaInit() (within RGui 1.5.1, on Windows
Error in .JavaInit() : Couldn't start Java Virtual Machine: Cannot find
the Omegahat interface manager class. Check you classpath!

(Before you right back saying read the emails, please read further - in
short, been there, done that)

RWin 1.5.1 (install from binaries)
OS Win 2000 SP3
jdk 1.4.0 (could this be it?? I saw requirement for 1.2 or 1.3 - I
wouldn't think this is the problem)
SJavaWin_0.62-8 binary
(. . . what else?)

Install procedure:
1. According to http://www.omegahat.org/RSJava/#Download,
cd $RHOME/library
unzip SJavaWin_0.62-8.zip
2. did that
3. got .Defunct error. email suggested changing SJava file in
4. did that
5. tried .JavaInit()

Attempts to solve problem:
1. Read the FAQ. Not much here on this one, although several emails
requesting help on this one, with no apparent solution.
2. Read the Archives. There were several emails concerning this, but
though one even said problem solved, but does not. It's a java classpath
problem, and not a LD_LIBRARY problem.
3. RTFM. Actually, the Howto.pdf dated 16 July 2002 (page 5), in fact
"The default values in .javaConfig are computed and fixed when the R
library is installed These contain
the entries of the default classpath necessary to locate the classes
used to run the embedded Omegahat
interpreter and also the system properties that control how that
interpreter is created and behaves (e.g.
class names for components, etc.)." The other manuals don't seem to
cover the
a. Tried setting a reasonable classpath, in my case
C:/R/rw1051/library/SJava in a CLASSPATH environment variable. java
should be able to find the
org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager. However I
noticed on the SJava file, in the javaConfig assignment, the
expression      if(nchar(tmp) > 0)
       classPath <- strsplit(tmp,":")[[1]]
" which seems to split based on a unix environment and not a windows.
Realizing I *shouldn't* need this just to see if things will run, took
out my CLASSPATH (after trying other various settings).
b. Tried modifying the SJava file where the default$classPath is set.
4. Uninstalled by deleting the library/SJava directory and started over.

Any help would be greatly appreciated. Also willing to be a guinea pig
for the windows stuff. Haven't tried a install from source. My next step
if I haven't really mucked things up.

novice R user, but plenty of java

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list