Failed installing SJava on MacOS
2
0
Entering edit mode
@michael-dondrup-3849
Last seen 10.2 years ago
Hi, I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's maybe not supported, but i hope it can be made working anyway. Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: > library(SJava) Load the Java VM with .JavaInit() > .JavaInit() > example(.Java) .Java> v <- .JavaConstructor("java.util.Vector", as.integer(10)) .Java> .Java(v, "add", "A string element") Error in .Java(v, "add", "A string element") : Can't find org.omegahat.R.Java.RForeignReference > During installation I got the following error message, which I suspect to be relevant: ... ** R ** inst cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs sh: /usr/bin/tarxf: No such file or directory .... I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything. I put the full output of javareconf, R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. Michael ====================================================================== ================================== Seneca:compile mdondrup$ R CMD javareconf Java interpreter : /System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/java Java version : 1.6.0_17 Java home path : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home Java compiler : /System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/javac Java headers gen.: /System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/javah Java archive tool: /System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/jar Java library path: JNI linker flags : -framework JavaVM JNI cpp flags : -I$(JAVA_HOME)/include Updating Java configuration in /Library/Frameworks/R.framework/Resources sed: -e: No such file or directory sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory sed: -e: No such file or directory sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory Done. Seneca:compile mdondrup$ sudo R CMD INSTALL -c SJava Password: * installing to library '/Library/Frameworks/R.framework/Resources/library' * installing *source* package 'SJava' ... checking shlib support in R... checking Java support in R... present: interpreter : '/System/Library/Frameworks/JavaVM.framework/Versions/Cu rrentJDK/Home/bin/java' archiver : '/System/Library/Frameworks/JavaVM.framework/Versions/Cu rrentJDK/Home/bin/jar' compiler : '/System/Library/Frameworks/JavaVM.framework/Versions/Cu rrentJDK/Home/bin/javac' header prep.: '/System/Library/Frameworks/JavaVM.framework/Versions/Cu rrentJDK/Home/bin/javah' cpp flags : '-I/System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/include' java libs : '-framework JavaVM' Looking in /System/Library/Frameworks/JavaVM.framework/Versions/Curren tJDK/Home/include checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for Rf_initEmbeddedR in -lR... yes configure: creating ./config.status config.status: creating Makevars config.status: creating src/Makevars config.status: creating src/RSJava/Makefile config.status: creating inst/scripts/RJava.bsh config.status: creating inst/scripts/RJava.csh config.status: creating cleanup config.status: creating inst/scripts/RJava Copying the cleanup script to the scripts/ directory ** libs ** arch - x86_64 /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/b in/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup /compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/b in/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup /compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/b in/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup /compile/SJava/inst/org/omegahat/Jars/Environment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/b in/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup /compile/SJava/inst/org/omegahat/Jars/Environment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator make -C RSJava /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/b in/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup /compile/SJava/inst/org/omegahat/Jars/Environment.jar -o OmegaInterfaceManager.h \ org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c CtoJava.c -o CtoJava.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ErrorHandling.c -o ErrorHandling.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ManagerInterfaceUtils.c -o ManagerInterfaceUtils.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c References.c -o References.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c JNIUtils.c -o JNIUtils.o gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o libRSNativeJava.so CtoJava.o ErrorHandling.o ManagerInterfaceUtils.o References.o JNIUtils.o -framework JavaVM if test ! -d /Library/Frameworks/R.framework/Resources/library/SJava/libs ; then \ mkdir /Library/Frameworks/R.framework/Resources/library/SJava/libs ; \ fi cp CtoJava.h ErrorHandling.h ManagerInterfaceUtils.h References.h JNIUtils.h /Users/mdondrup/compile/SJava/inst/include mv libRSNativeJava.so /Users/mdondrup/compile/SJava/inst/libs gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c ConverterExamples.c -o ConverterExamples.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Converters.c -o Converters.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Reflectance.c -o Reflectance.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbed.c -o REmbed.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbedWin.c -o REmbedWin.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REval.c -o REval.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RFunctionListener.c -o RFunctionListener.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RReferenceCall.c -o RReferenceCall.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RStoJava.c -o RStoJava.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RtoJava.c -o RtoJava.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/CtoJava.c -o RSJava/CtoJava.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ErrorHandling.c -o RSJava/ErrorHandling.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ManagerInterfaceUtils.c -o RSJava/ManagerInterfaceUtils.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/References.c -o RSJava/References.o gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/JNIUtils.c -o RSJava/JNIUtils.o gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o SJava.so ConverterExamples.o Converters.o Reflectance.o REmbed.o REmbedWin.o REval.o RFunctionListener.o RReferenceCall.o RStoJava.o RtoJava.o RSJava/CtoJava.o RSJava/ErrorHandling.o RSJava/ManagerInterfaceUtils.o RSJava/References.o RSJava/JNIUtils.o -framework JavaVM -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJava /libs/libSJava.so ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJava /libs/libRInterpreter.so ** R ** inst cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs sh: /usr/bin/tarxf: No such file or directory ** preparing package for lazy loading Creating a new generic function for "merge" in "SJava" ** help *** installing help indices ** building package indices ... make -C RSJava -f Makefile clean rm OmegaInterfaceManager.h rm RForeignReference.h RManualFunctionActionListener.h ROmegahatInterpreter.h REvaluator.h * DONE (SJava) > sessionInfo() R version 2.10.1 (2009-12-14) x86_64-apple-darwin9.8.0 locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] SJava_0.72.0 loaded via a namespace (and not attached): [1] tools_2.10.1 >
RWebServices SJava RWebServices SJava • 2.6k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States
Michael Dondrup wrote: > Hi, > I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's > maybe not supported, but i hope it can be made working anyway. > Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: > >> library(SJava) > Load the Java VM with .JavaInit() >> .JavaInit() >> example(.Java) > > .Java> v <- .JavaConstructor("java.util.Vector", as.integer(10)) > > .Java> .Java(v, "add", "A string element") > Error in .Java(v, "add", "A string element") : > Can't find org.omegahat.R.Java.RForeignReference Hi Michael -- .JavaInit has an argument default=javaConfig() which sets the class path and other variables. My guess is that javaConfig() needs to be augmented to return the correct class path. On my system it is > javaConfig()@classPath [1] "<...>/library/SJava/org/omegahat/Jars/Environment.jar" [2] "<...>/library/SJava/org/.." [3] "<...>/library/SJava/org/omegahat/Jars/antlr.jar" [4] "<...>/library/SJava/org/omegahat/Jars/jas.jar" [5] "<...>/library/SJava/org/omegahat/Jars/jhall.jar" where <...> is the path to my R installation. Martin > > During installation I got the following error message, which I suspect to be relevant: > > ... > ** R > ** inst > cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs > sh: /usr/bin/tarxf: No such file or directory > .... > > I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything. > I put the full output of javareconf, R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. > > Michael > > > > ==================================================================== ==================================== > > Seneca:compile mdondrup$ R CMD javareconf > Java interpreter : /System/Library/Frameworks/JavaVM.framework/Versi ons/CurrentJDK/Home/bin/java > Java version : 1.6.0_17 > Java home path : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home > Java compiler : /System/Library/Frameworks/JavaVM.framework/Versi ons/CurrentJDK/Home/bin/javac > Java headers gen.: /System/Library/Frameworks/JavaVM.framework/Versi ons/CurrentJDK/Home/bin/javah > Java archive tool: /System/Library/Frameworks/JavaVM.framework/Versi ons/CurrentJDK/Home/bin/jar > Java library path: > JNI linker flags : -framework JavaVM > JNI cpp flags : -I$(JAVA_HOME)/include > > Updating Java configuration in /Library/Frameworks/R.framework/Resources > sed: -e: No such file or directory > sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory > sed: -e: No such file or directory > sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory > Done. > > Seneca:compile mdondrup$ sudo R CMD INSTALL -c SJava > Password: > * installing to library '/Library/Frameworks/R.framework/Resources/library' > * installing *source* package 'SJava' ... > checking shlib support in R... checking Java support in R... present: > interpreter : '/System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/bin/java' > archiver : '/System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/bin/jar' > compiler : '/System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/bin/javac' > header prep.: '/System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/bin/javah' > cpp flags : '-I/System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/include' > java libs : '-framework JavaVM' > Looking in /System/Library/Frameworks/JavaVM.framework/Versions/Curr entJDK/Home/include > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for Rf_initEmbeddedR in -lR... yes > configure: creating ./config.status > config.status: creating Makevars > config.status: creating src/Makevars > config.status: creating src/RSJava/Makefile > config.status: creating inst/scripts/RJava.bsh > config.status: creating inst/scripts/RJava.csh > config.status: creating cleanup > config.status: creating inst/scripts/RJava > Copying the cleanup script to the scripts/ directory > ** libs > ** arch - x86_64 > /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home /bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondr up/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference > /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home /bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondr up/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener > /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home /bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondr up/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter > /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home /bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondr up/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator > make -C RSJava > /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home /bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondr up/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o OmegaInterfaceManager.h \ > org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c CtoJava.c -o CtoJava.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ErrorHandling.c -o ErrorHandling.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ManagerInterfaceUtils.c -o ManagerInterfaceUtils.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c References.c -o References.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c JNIUtils.c -o JNIUtils.o > gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o libRSNativeJava.so CtoJava.o ErrorHandling.o ManagerInterfaceUtils.o References.o JNIUtils.o -framework JavaVM > if test ! -d /Library/Frameworks/R.framework/Resources/library/SJava/libs ; then \ > mkdir /Library/Frameworks/R.framework/Resources/library/SJava/libs ; \ > fi > cp CtoJava.h ErrorHandling.h ManagerInterfaceUtils.h References.h JNIUtils.h /Users/mdondrup/compile/SJava/inst/include > mv libRSNativeJava.so /Users/mdondrup/compile/SJava/inst/libs > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c ConverterExamples.c -o ConverterExamples.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Converters.c -o Converters.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Reflectance.c -o Reflectance.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbed.c -o REmbed.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbedWin.c -o REmbedWin.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REval.c -o REval.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RFunctionListener.c -o RFunctionListener.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RReferenceCall.c -o RReferenceCall.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RStoJava.c -o RStoJava.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RtoJava.c -o RtoJava.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/CtoJava.c -o RSJava/CtoJava.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ErrorHandling.c -o RSJava/ErrorHandling.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ManagerInterfaceUtils.c -o RSJava/ManagerInterfaceUtils.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/References.c -o RSJava/References.o > gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/JNIUtils.c -o RSJava/JNIUtils.o > gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o SJava.so ConverterExamples.o Converters.o Reflectance.o REmbed.o REmbedWin.o REval.o RFunctionListener.o RReferenceCall.o RStoJava.o RtoJava.o RSJava/CtoJava.o RSJava/ErrorHandling.o RSJava/ManagerInterfaceUtils.o RSJava/References.o RSJava/JNIUtils.o -framework JavaVM -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation > ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJa va/libs/libSJava.so > ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJa va/libs/libRInterpreter.so > ** R > ** inst > cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs > sh: /usr/bin/tarxf: No such file or directory > ** preparing package for lazy loading > Creating a new generic function for "merge" in "SJava" > ** help > *** installing help indices > ** building package indices ... > make -C RSJava -f Makefile clean > rm OmegaInterfaceManager.h > rm RForeignReference.h RManualFunctionActionListener.h ROmegahatInterpreter.h REvaluator.h > * DONE (SJava) > > > > > > > > >> sessionInfo() > R version 2.10.1 (2009-12-14) > x86_64-apple-darwin9.8.0 > > locale: > [1] C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] SJava_0.72.0 > > loaded via a namespace (and not attached): > [1] tools_2.10.1 > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT
0
Entering edit mode
@michael-dondrup-3849
Last seen 10.2 years ago
Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: > Michael Dondrup wrote: >> Hi, >> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >> maybe not supported, but i hope it can be made working anyway. >> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >> >>> library(SJava) >> Load the Java VM with .JavaInit() >>> .JavaInit() >>> example(.Java) >> >> .Java> v <- .JavaConstructor("java.util.Vector", as.integer(10)) >> >> .Java> .Java(v, "add", "A string element") >> Error in .Java(v, "add", "A string element") : >> Can't find org.omegahat.R.Java.RForeignReference > > Hi Michael -- > > .JavaInit has an argument default=javaConfig() which sets the class path > and other variables. My guess is that javaConfig() needs to be augmented > to return the correct class path. On my system it is > >> javaConfig()@classPath > [1] "<...>/library/SJava/org/omegahat/Jars/Environment.jar" > [2] "<...>/library/SJava/org/.." > [3] "<...>/library/SJava/org/omegahat/Jars/antlr.jar" > [4] "<...>/library/SJava/org/omegahat/Jars/jas.jar" > [5] "<...>/library/SJava/org/omegahat/Jars/jhall.jar" > > where <...> is the path to my R installation. > > Martin Hi Martin, thank you very much for your reply. My configuration looks pretty much like yours. All jars exist and readable. I tried messing around with the paths in addition, adding "/Library/Frameworks/R.framework/Resources/library/SJava/org/" (without the ..), to no avail. Are you using a Mac? It would be good to compare the full output of javaConfig() for a functioning version, maybe you could send that to me? And might be good to know in which jar the class org.omegahat.R.Java.RForeignReference is contained. If that is relevant: java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) Here is the output of javaConfig(). > javaConfig() An object of class "JavaConfiguration" Slot "classPath": [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omega hat/Jars/Environment.jar" [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omega hat/Jars/antlr.jar" [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omega hat/Jars/jas.jar" [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omega hat/Jars/jhall.jar" Slot "libraryPath": [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" Slot "properties": EmbeddedInR "true" InterfaceManagerClass "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" ForeignReferenceBaseClass "org/omegahat/R/Java/RJavaInstance" java.compiler "NONE" OMEGA_HOME "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" OmegahatSearchPath ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Environmen t.jar" java.library.path "/Library/Frameworks/R.framework/Resources/library/SJava/libs" Slot "options": character(0) Slot "args": character(0) > > >> >> During installation I got the following error message, which I suspect to be relevant: >> >> ... >> ** R >> ** inst >> cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs >> sh: /usr/bin/tarxf: No such file or directory >> .... >> >> I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything. >> I put the full output of javareconf, R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. >> >> Michael >> >> >> >> =================================================================== ===================================== >> >> Seneca:compile mdondrup$ R CMD javareconf >> Java interpreter : /System/Library/Frameworks/JavaVM.framework/Vers ions/CurrentJDK/Home/bin/java >> Java version : 1.6.0_17 >> Java home path : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home >> Java compiler : /System/Library/Frameworks/JavaVM.framework/Vers ions/CurrentJDK/Home/bin/javac >> Java headers gen.: /System/Library/Frameworks/JavaVM.framework/Vers ions/CurrentJDK/Home/bin/javah >> Java archive tool: /System/Library/Frameworks/JavaVM.framework/Vers ions/CurrentJDK/Home/bin/jar >> Java library path: >> JNI linker flags : -framework JavaVM >> JNI cpp flags : -I$(JAVA_HOME)/include >> >> Updating Java configuration in /Library/Frameworks/R.framework/Resources >> sed: -e: No such file or directory >> sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory >> sed: -e: No such file or directory >> sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory >> Done. >> >> Seneca:compile mdondrup$ sudo R CMD INSTALL -c SJava >> Password: >> * installing to library '/Library/Frameworks/R.framework/Resources/library' >> * installing *source* package 'SJava' ... >> checking shlib support in R... checking Java support in R... present: >> interpreter : '/System/Library/Frameworks/JavaVM.framework/Versions /CurrentJDK/Home/bin/java' >> archiver : '/System/Library/Frameworks/JavaVM.framework/Versions /CurrentJDK/Home/bin/jar' >> compiler : '/System/Library/Frameworks/JavaVM.framework/Versions /CurrentJDK/Home/bin/javac' >> header prep.: '/System/Library/Frameworks/JavaVM.framework/Versions /CurrentJDK/Home/bin/javah' >> cpp flags : '-I/System/Library/Frameworks/JavaVM.framework/Versio ns/CurrentJDK/Home/include' >> java libs : '-framework JavaVM' >> Looking in /System/Library/Frameworks/JavaVM.framework/Versions/Cur rentJDK/Home/include >> checking for gcc... gcc >> checking for C compiler default output file name... a.out >> checking whether the C compiler works... yes >> checking whether we are cross compiling... no >> checking for suffix of executables... >> checking for suffix of object files... o >> checking whether we are using the GNU C compiler... yes >> checking whether gcc accepts -g... yes >> checking for gcc option to accept ISO C89... none needed >> checking for Rf_initEmbeddedR in -lR... yes >> configure: creating ./config.status >> config.status: creating Makevars >> config.status: creating src/Makevars >> config.status: creating src/RSJava/Makefile >> config.status: creating inst/scripts/RJava.bsh >> config.status: creating inst/scripts/RJava.csh >> config.status: creating cleanup >> config.status: creating inst/scripts/RJava >> Copying the cleanup script to the scripts/ directory >> ** libs >> ** arch - x86_64 >> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Hom e/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdond rup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference >> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Hom e/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdond rup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener >> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Hom e/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdond rup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter >> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Hom e/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdond rup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator >> make -C RSJava >> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Hom e/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdond rup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o OmegaInterfaceManager.h \ >> org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c CtoJava.c -o CtoJava.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ErrorHandling.c -o ErrorHandling.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ManagerInterfaceUtils.c -o ManagerInterfaceUtils.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c References.c -o References.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c JNIUtils.c -o JNIUtils.o >> gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o libRSNativeJava.so CtoJava.o ErrorHandling.o ManagerInterfaceUtils.o References.o JNIUtils.o -framework JavaVM >> if test ! -d /Library/Frameworks/R.framework/Resources/library/SJava/libs ; then \ >> mkdir /Library/Frameworks/R.framework/Resources/library/SJava/libs ; \ >> fi >> cp CtoJava.h ErrorHandling.h ManagerInterfaceUtils.h References.h JNIUtils.h /Users/mdondrup/compile/SJava/inst/include >> mv libRSNativeJava.so /Users/mdondrup/compile/SJava/inst/libs >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c ConverterExamples.c -o ConverterExamples.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Converters.c -o Converters.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Reflectance.c -o Reflectance.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbed.c -o REmbed.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbedWin.c -o REmbedWin.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REval.c -o REval.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RFunctionListener.c -o RFunctionListener.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RReferenceCall.c -o RReferenceCall.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RStoJava.c -o RStoJava.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RtoJava.c -o RtoJava.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/CtoJava.c -o RSJava/CtoJava.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ErrorHandling.c -o RSJava/ErrorHandling.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ManagerInterfaceUtils.c -o RSJava/ManagerInterfaceUtils.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/References.c -o RSJava/References.o >> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/JNIUtils.c -o RSJava/JNIUtils.o >> gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o SJava.so ConverterExamples.o Converters.o Reflectance.o REmbed.o REmbedWin.o REval.o RFunctionListener.o RReferenceCall.o RStoJava.o RtoJava.o RSJava/CtoJava.o RSJava/ErrorHandling.o RSJava/ManagerInterfaceUtils.o RSJava/References.o RSJava/JNIUtils.o -framework JavaVM -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation >> ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJ ava/libs/libSJava.so >> ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJ ava/libs/libRInterpreter.so >> ** R >> ** inst >> cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs >> sh: /usr/bin/tarxf: No such file or directory >> ** preparing package for lazy loading >> Creating a new generic function for "merge" in "SJava" >> ** help >> *** installing help indices >> ** building package indices ... >> make -C RSJava -f Makefile clean >> rm OmegaInterfaceManager.h >> rm RForeignReference.h RManualFunctionActionListener.h ROmegahatInterpreter.h REvaluator.h >> * DONE (SJava) >> >> >> >> >> >> >> >> >>> sessionInfo() >> R version 2.10.1 (2009-12-14) >> x86_64-apple-darwin9.8.0 >> >> locale: >> [1] C >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] SJava_0.72.0 >> >> loaded via a namespace (and not attached): >> [1] tools_2.10.1 >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > > -- > Martin Morgan > Computational Biology / Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. > PO Box 19024 Seattle, WA 98109 > > Location: Arnold Building M1 B861 > Phone: (206) 667-2793
ADD COMMENT
0
Entering edit mode
Michael Dondrup wrote: > Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: > >> Michael Dondrup wrote: >>> Hi, >>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>> maybe not supported, but i hope it can be made working anyway. >>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>> >>>> library(SJava) >>> Load the Java VM with .JavaInit() >>>> .JavaInit() >>>> example(.Java) >>> .Java> v <- .JavaConstructor("java.util.Vector", as.integer(10)) >>> >>> .Java> .Java(v, "add", "A string element") >>> Error in .Java(v, "add", "A string element") : >>> Can't find org.omegahat.R.Java.RForeignReference this is in org.omegahat/Jars/RJava.jar, e.g., jar tf org.omegahat/Jars/RJava.jar more below... >> Hi Michael -- >> >> .JavaInit has an argument default=javaConfig() which sets the class path >> and other variables. My guess is that javaConfig() needs to be augmented >> to return the correct class path. On my system it is >> >>> javaConfig()@classPath >> [1] "<...>/library/SJava/org/omegahat/Jars/Environment.jar" >> [2] "<...>/library/SJava/org/.." >> [3] "<...>/library/SJava/org/omegahat/Jars/antlr.jar" >> [4] "<...>/library/SJava/org/omegahat/Jars/jas.jar" >> [5] "<...>/library/SJava/org/omegahat/Jars/jhall.jar" >> >> where <...> is the path to my R installation. >> >> Martin > > Hi Martin, > thank you very much for your reply. My configuration looks pretty much like yours. All jars exist and readable. > I tried messing around > with the paths in addition, adding "/Library/Frameworks/R.framework/Resources/library/SJava/org/" (without the ..), to no avail. > Are you using a Mac? It would be good to compare the full output of javaConfig() for a functioning version, > maybe you could send that to me? > And might be good to know in which jar the class org.omegahat.R.Java.RForeignReference is contained. > > > If that is relevant: > > java version "1.6.0_17" > Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) > Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) > > > Here is the output of javaConfig(). > >> javaConfig() > An object of class "JavaConfiguration" > Slot "classPath": > [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ome gahat/Jars/Environment.jar" > [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." > [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ome gahat/Jars/antlr.jar" > [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ome gahat/Jars/jas.jar" > [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ome gahat/Jars/jhall.jar" > > Slot "libraryPath": > [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" > > Slot "properties": > EmbeddedInR > "true" > InterfaceManagerClass > "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" > ForeignReferenceBaseClass > "org/omegahat/R/Java/RJavaInstance" > java.compiler > "NONE" > OMEGA_HOME > "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" > OmegahatSearchPath > ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Environm ent.jar" My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded Slot "properties": EmbeddedInR "true" InterfaceManagerClass "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" ForeignReferenceBaseClass "org/omegahat/R/Java/RJavaInstance" java.compiler "NONE" OMEGA_HOME "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat" OmegahatSearchPath ".,/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat/Envir onment/Scripts/Run,/home/mtmorgan/arch/x86_64/R-devel/library/SJava/or g/omegahat/Jars/Environment.jar" java.library.path "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/libs" > java.library.path > "/Library/Frameworks/R.framework/Resources/library/SJava/libs" > > Slot "options": > character(0) > > Slot "args": > character(0) > > > > > > > > > > >>> During installation I got the following error message, which I suspect to be relevant: >>> >>> ... >>> ** R >>> ** inst >>> cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs >>> sh: /usr/bin/tarxf: No such file or directory >>> .... >>> >>> I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything. >>> I put the full output of javareconf, R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. >>> >>> Michael >>> >>> >>> >>> ================================================================== ====================================== >>> >>> Seneca:compile mdondrup$ R CMD javareconf >>> Java interpreter : /System/Library/Frameworks/JavaVM.framework/Ver sions/CurrentJDK/Home/bin/java >>> Java version : 1.6.0_17 >>> Java home path : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home >>> Java compiler : /System/Library/Frameworks/JavaVM.framework/Ver sions/CurrentJDK/Home/bin/javac >>> Java headers gen.: /System/Library/Frameworks/JavaVM.framework/Ver sions/CurrentJDK/Home/bin/javah >>> Java archive tool: /System/Library/Frameworks/JavaVM.framework/Ver sions/CurrentJDK/Home/bin/jar >>> Java library path: >>> JNI linker flags : -framework JavaVM >>> JNI cpp flags : -I$(JAVA_HOME)/include >>> >>> Updating Java configuration in /Library/Frameworks/R.framework/Resources >>> sed: -e: No such file or directory >>> sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory >>> sed: -e: No such file or directory >>> sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory >>> Done. >>> >>> Seneca:compile mdondrup$ sudo R CMD INSTALL -c SJava >>> Password: >>> * installing to library '/Library/Frameworks/R.framework/Resources/library' >>> * installing *source* package 'SJava' ... >>> checking shlib support in R... checking Java support in R... present: >>> interpreter : '/System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/java' >>> archiver : '/System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/jar' >>> compiler : '/System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/javac' >>> header prep.: '/System/Library/Frameworks/JavaVM.framework/Version s/CurrentJDK/Home/bin/javah' >>> cpp flags : '-I/System/Library/Frameworks/JavaVM.framework/Versi ons/CurrentJDK/Home/include' >>> java libs : '-framework JavaVM' >>> Looking in /System/Library/Frameworks/JavaVM.framework/Versions/Cu rrentJDK/Home/include >>> checking for gcc... gcc >>> checking for C compiler default output file name... a.out >>> checking whether the C compiler works... yes >>> checking whether we are cross compiling... no >>> checking for suffix of executables... >>> checking for suffix of object files... o >>> checking whether we are using the GNU C compiler... yes >>> checking whether gcc accepts -g... yes >>> checking for gcc option to accept ISO C89... none needed >>> checking for Rf_initEmbeddedR in -lR... yes >>> configure: creating ./config.status >>> config.status: creating Makevars >>> config.status: creating src/Makevars >>> config.status: creating src/RSJava/Makefile >>> config.status: creating inst/scripts/RJava.bsh >>> config.status: creating inst/scripts/RJava.csh >>> config.status: creating cleanup >>> config.status: creating inst/scripts/RJava >>> Copying the cleanup script to the scripts/ directory >>> ** libs >>> ** arch - x86_64 >>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Ho me/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdon drup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference >>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Ho me/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdon drup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener >>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Ho me/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdon drup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter >>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Ho me/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdon drup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator >>> make -C RSJava >>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Ho me/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdon drup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o OmegaInterfaceManager.h \ >>> org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c CtoJava.c -o CtoJava.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ErrorHandling.c -o ErrorHandling.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c ManagerInterfaceUtils.c -o ManagerInterfaceUtils.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c References.c -o References.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/local/include -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -fPIC -mtune=core2 -g -O2 -c JNIUtils.c -o JNIUtils.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o libRSNativeJava.so CtoJava.o ErrorHandling.o ManagerInterfaceUtils.o References.o JNIUtils.o -framework JavaVM >>> if test ! -d /Library/Frameworks/R.framework/Resources/library/SJava/libs ; then \ >>> mkdir /Library/Frameworks/R.framework/Resources/library/SJava/libs ; \ >>> fi >>> cp CtoJava.h ErrorHandling.h ManagerInterfaceUtils.h References.h JNIUtils.h /Users/mdondrup/compile/SJava/inst/include >>> mv libRSNativeJava.so /Users/mdondrup/compile/SJava/inst/libs >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c ConverterExamples.c -o ConverterExamples.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Converters.c -o Converters.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c Reflectance.c -o Reflectance.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbed.c -o REmbed.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REmbedWin.c -o REmbedWin.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c REval.c -o REval.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RFunctionListener.c -o RFunctionListener.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RReferenceCall.c -o RReferenceCall.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RStoJava.c -o RStoJava.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RtoJava.c -o RtoJava.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/CtoJava.c -o RSJava/CtoJava.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ErrorHandling.c -o RSJava/ErrorHandling.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/ManagerInterfaceUtils.c -o RSJava/ManagerInterfaceUtils.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/References.c -o RSJava/References.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava -I. -I/Users/mdondrup/compile/SJava/inst/include -I/System/Library/Framew orks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Libra ry/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/includ e -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c RSJava/JNIUtils.c -o RSJava/JNIUtils.o >>> gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o SJava.so ConverterExamples.o Converters.o Reflectance.o REmbed.o REmbedWin.o REval.o RFunctionListener.o RReferenceCall.o RStoJava.o RtoJava.o RSJava/CtoJava.o RSJava/ErrorHandling.o RSJava/ManagerInterfaceUtils.o RSJava/References.o RSJava/JNIUtils.o -framework JavaVM -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation >>> ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/S Java/libs/libSJava.so >>> ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/S Java/libs/libRInterpreter.so >>> ** R >>> ** inst >>> cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs >>> sh: /usr/bin/tarxf: No such file or directory >>> ** preparing package for lazy loading >>> Creating a new generic function for "merge" in "SJava" >>> ** help >>> *** installing help indices >>> ** building package indices ... >>> make -C RSJava -f Makefile clean >>> rm OmegaInterfaceManager.h >>> rm RForeignReference.h RManualFunctionActionListener.h ROmegahatInterpreter.h REvaluator.h >>> * DONE (SJava) >>> >>> >>> >>> >>> >>> >>> >>> >>>> sessionInfo() >>> R version 2.10.1 (2009-12-14) >>> x86_64-apple-darwin9.8.0 >>> >>> locale: >>> [1] C >>> >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> >>> other attached packages: >>> [1] SJava_0.72.0 >>> >>> loaded via a namespace (and not attached): >>> [1] tools_2.10.1 >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> -- >> Martin Morgan >> Computational Biology / Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N. >> PO Box 19024 Seattle, WA 98109 >> >> Location: Arnold Building M1 B861 >> Phone: (206) 667-2793 > -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD REPLY
0
Entering edit mode
On 1/19/10 8:58 AM, Martin Morgan wrote: > Michael Dondrup wrote: >> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >> >>> Michael Dondrup wrote: >>>> Hi, >>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>> maybe not supported, but i hope it can be made working anyway. >>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>> >>>>> library(SJava) >>>> Load the Java VM with .JavaInit() >>>>> .JavaInit() >>>>> example(.Java) >>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) >>>> >>>> .Java> .Java(v, "add", "A string element") >>>> Error in .Java(v, "add", "A string element") : >>>> Can't find org.omegahat.R.Java.RForeignReference > > this is in org.omegahat/Jars/RJava.jar, e.g., > > jar tf org.omegahat/Jars/RJava.jar > Curious, as this jar did not appear on your classpath in your previous mail. I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path. > more below... >> Here is the output of javaConfig(). >> >>> javaConfig() >> An object of class "JavaConfiguration" >> Slot "classPath": >> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/Environment.jar" >> [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." >> [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/antlr.jar" >> [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/jas.jar" >> [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/jhall.jar" >> >> Slot "libraryPath": >> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >> >> Slot "properties": >> EmbeddedInR >> "true" >> InterfaceManagerClass >> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" >> ForeignReferenceBaseClass >> "org/omegahat/R/Java/RJavaInstance" >> java.compiler >> "NONE" >> OMEGA_HOME >> "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" >> OmegahatSearchPath >> ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Environ ment.jar" > > My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded Mine is not expanded. I tried expanding it, but that didn't seem to make a difference either. :-( -- Seth Falcon Bioconductor Core Team | FHCRC
ADD REPLY
0
Entering edit mode
Hi, I thought I could do a quick test on Ubuntu in my virtual box and compare, but that went even worse. I started on a freshly installed R 2.10.1 (from CRAN) in ubuntu 9.04. Here are the details, any ideas? michi at michi-laptop:~$ sudo R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_16 Java home path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre Java compiler : /usr/bin/javac Java headers gen.: /usr/bin/javah Java archive tool: /usr/bin/jar Java library path: $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i386: $(JAVA_HOME)/../lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux Updating Java configuration in /etc/R Done. michi at michi-laptop:~$ sudo R CMD INSTALL -c Desktop/SJava_0.73.0.tar.gz * installing to library ?/usr/local/lib/R/site-library? * installing *source* package ?SJava? ... checking shlib support in R... checking Java support in R... present: interpreter : '/usr/bin/java' archiver : '/usr/bin/jar' compiler : '/usr/bin/javac' header prep.: '/usr/bin/javah' cpp flags : '-I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include/linux' java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/client -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386 -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm' Looking in /usr/lib/jvm/java-6-sun-1.6.0.16/jre/include Exception in thread "main" java.lang.NullPointerException at jniParameters.findJniInclude(jniParameters.java:76) at jniParameters.findJniInclude(jniParameters.java:61) at jniParameters.compute(jniParameters.java:40) at jniParameters.<init>(jniParameters.java:12) at jniBashParameters.<init>(jniBashParameters.java:11) at jniBashParameters.main(jniBashParameters.java:7) checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for Rf_initEmbeddedR in -lR... yes configure: creating ./config.status config.status: creating Makevars config.status: creating src/Makevars config.status: creating src/RSJava/Makefile config.status: creating inst/scripts/RJava.bsh config.status: creating inst/scripts/RJava.csh config.status: creating cleanup config.status: creating inst/scripts/RJava Copying the cleanup script to the scripts/ directory ** libs /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst :/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Enviro nment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst :/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Enviro nment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst :/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Enviro nment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst :/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Enviro nment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator make -C RSJava make[1]: Entering directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst :/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Enviro nment.jar -o OmegaInterfaceManager.h \ org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager gcc -std=gnu99 -I/usr/share/R/include -D_R_ -I/usr/lib/R/include -I/usr/lib/R/include/R_ext -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava -I. -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include/ -fpic -g -O2 -c CtoJava.c -o CtoJava.o In file included from CtoJava.c:6: CtoJava.h:9:17: error: jni.h: No such file or directory In file included from CtoJava.c:6: CtoJava.h:14: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?NullObject? CtoJava.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?OmegahatInterfaceManagerClass? CtoJava.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? CtoJava.h:100: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.h:106: error: expected ?)? before ?Manager? CtoJava.h:109: error: expected ?)? before ?*? token CtoJava.h:112: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?RS_createForeignReference? CtoJava.h:116: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getInterfaceManager? CtoJava.h:117: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?setInterfaceManager? CtoJava.h:120: error: expected declaration specifiers or ?...? before ?JNIEnv? CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.h:126: error: expected ?)? before ?*? token CtoJava.h:129: error: expected ?)? before ?*? token CtoJava.h:137: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?findGetPrimitiveMethodID? CtoJava.h:140: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.h:142: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.h:143: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.h:144: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.h:145: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?releaseThreadJNIEnv? CtoJava.h:149: error: expected ?)? before ?*? token CtoJava.h:150: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token In file included from CtoJava.c:8: ErrorHandling.h:14: error: expected declaration specifiers or ?...? before ?JNIEnv? ErrorHandling.h:19: error: expected declaration specifiers or ?...? before ?JNIEnv? ErrorHandling.h:20: error: expected ?)? before ?*? token ErrorHandling.h:21: error: expected ?)? before ?*? token ErrorHandling.h:24: error: expected declaration specifiers or ?...? before ?jthrowable? ErrorHandling.h:24: error: expected declaration specifiers or ?...? before ?JNIEnv? ErrorHandling.h:27: error: expected ?)? before ?*? token ErrorHandling.h:30: error: expected declaration specifiers or ?...? before ?JNIEnv? In file included from CtoJava.c:9: JNIUtils.h:12: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_method_id? JNIUtils.h:16: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_object_class_name? JNIUtils.h:19: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_java_class_name? JNIUtils.h:23: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?VMNewStringArray? JNIUtils.h:26: error: expected ?)? before ?obj? In file included from CtoJava.c:13: ManagerInterfaceUtils.h:12: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?callGenericOmegaMethod? ManagerInterfaceUtils.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?callConstructorMethod? ManagerInterfaceUtils.h:22: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?evalOmegaExpression? ManagerInterfaceUtils.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_object_datatype? ManagerInterfaceUtils.h:31: error: expected ?)? before ?OmegahatInterfaceManagerClass? ManagerInterfaceUtils.h:35: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getOmegahatReferenceValue? In file included from CtoJava.c:14: OmegaInterfaceManager.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jboolean? CtoJava.c:17: error: expected ?)? before ?*? token CtoJava.c:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:38: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?vm1_args? CtoJava.c:39: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?vm2_args? CtoJava.c:41: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:47: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?interfaceManager? CtoJava.c:63: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:70: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?doubleValueID? CtoJava.c:73: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? CtoJava.c:76: error: expected ?)? before ?Manager? CtoJava.c:79: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?OmegahatInterfaceManagerClass? CtoJava.c:80: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? CtoJava.c:83: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?NullObject? CtoJava.c:89: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?MetaForeignReferenceClass? CtoJava.c:94: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?MetaForeignReferenceConstructorId? CtoJava.c:96: error: expected ?)? before ?*? token CtoJava.c:101: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?arrayClasses? CtoJava.c:119: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?wrapperClasses? CtoJava.c:120: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?wrapperConstructor? CtoJava.c: In function ?interface_start_VM?: CtoJava.c:164: error: too many arguments to function ?create_Java_vm? CtoJava.c: At top level: CtoJava.c:182: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.c: In function ?create_Java_vm?: CtoJava.c:184: error: ?jint? undeclared (first use in this function) CtoJava.c:184: error: (Each undeclared identifier is reported only once CtoJava.c:184: error: for each function it appears in.) CtoJava.c:184: error: expected ?;? before ?res? CtoJava.c:187: error: ?std_env? undeclared (first use in this function) CtoJava.c:189: error: ?jvm? undeclared (first use in this function) CtoJava.c:204: error: ?vm_args? undeclared (first use in this function) CtoJava.c:204: error: ?JDK1_1InitArgs? undeclared (first use in this function) CtoJava.c:204: error: expected expression before ?)? token CtoJava.c:210: error: expected expression before ?)? token CtoJava.c:210: error: ?vm1_args? undeclared (first use in this function) CtoJava.c:211: error: ?JNI_VERSION_1_1? undeclared (first use in this function) CtoJava.c:213: warning: implicit declaration of function ?JNI_GetDefaultJavaVMInitArgs? CtoJava.c: At top level: CtoJava.c:283: warning: data definition has no type or storage class CtoJava.c:283: warning: type defaults to ?int? in declaration of ?tmp? CtoJava.c:283: error: ?user_classpath? undeclared here (not in a function) CtoJava.c:283: error: ?vm_args? undeclared here (not in a function) CtoJava.c:283: warning: initialization makes integer from pointer without a cast CtoJava.c:283: error: initializer element is not constant CtoJava.c:285: warning: data definition has no type or storage class CtoJava.c:285: warning: type defaults to ?int? in declaration of ?strcpy? CtoJava.c:285: warning: parameter names (without types) in function declaration CtoJava.c:285: error: conflicting types for ?strcpy? CtoJava.c:286: error: expected ?)? before string constant CtoJava.c:287: error: expected ?)? before ?->? token CtoJava.c:288: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?->? token CtoJava.c:291: error: expected identifier or ?(? before ?if? CtoJava.c:298: error: expected identifier or ?(? before ?if? CtoJava.c:305: error: expected identifier or ?(? before ?return? CtoJava.c:306: error: expected identifier or ?(? before ?}? token CtoJava.c: In function ?exists_Java_vm?: CtoJava.c:311: error: ?std_env? undeclared (first use in this function) CtoJava.c: At top level: CtoJava.c:316: error: expected ?)? before ?Manager? CtoJava.c:354: error: expected ?)? before ?Manager? CtoJava.c:475: error: expected ?)? before ?*? token CtoJava.c:517: error: expected declaration specifiers or ?...? before ?JNIEnv? CtoJava.c: In function ?whatJavaType?: CtoJava.c:518: error: ?jobject? undeclared (first use in this function) CtoJava.c:518: error: expected ?;? before ?obj? CtoJava.c:519: error: ?obj? undeclared (first use in this function) CtoJava.c:519: error: expected ?;? before ?javaObject? CtoJava.c:526: error: ?env? undeclared (first use in this function) CtoJava.c:526: error: ?arrayClasses? undeclared (first use in this function) CtoJava.c:526: error: ?JNI_TRUE? undeclared (first use in this function) CtoJava.c:530: error: ?primitiveClasses? undeclared (first use in this function) CtoJava.c: At top level: CtoJava.c:552: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.c:553: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.c:553: error: expected declaration specifiers or ?...? before ?jboolean? CtoJava.c: In function ?which_java_type?: CtoJava.c:562: error: ?builtIn? undeclared (first use in this function) CtoJava.c:563: error: ?JNI_TRUE? undeclared (first use in this function) CtoJava.c:566: error: ?JNI_FALSE? undeclared (first use in this function) CtoJava.c: At top level: CtoJava.c:708: error: expected ?)? before ?*? token CtoJava.c:866: error: expected ?)? before ?*? token CtoJava.c:1047: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:1074: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:1081: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:1132: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?releaseThreadJNIEnv? CtoJava.c:1152: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:1159: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token CtoJava.c:1166: error: expected ?)? before ?*? token CtoJava.c: In function ?RS_JAVA_terminateJava?: CtoJava.c:1174: error: ?JavaVM? undeclared (first use in this function) CtoJava.c:1174: error: ?vm? undeclared (first use in this function) CtoJava.c:1174: warning: implicit declaration of function ?getJavaVM? CtoJava.c:1177: error: ?jvm? undeclared (first use in this function) CtoJava.c: At top level: CtoJava.c:1184: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getInterfaceManager? CtoJava.c:1188: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?setInterfaceManager? CtoJava.c:1202: error: expected ?)? before ?*? token CtoJava.c:1225: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?RS_createForeignReference? CtoJava.c:1243: error: expected ?)? before ?*? token CtoJava.c:1292: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?findGetPrimitiveMethodID? make[1]: *** [CtoJava.o] Error 1 make[1]: Leaving directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' make: *** [subdir] Error 2 ERROR: compilation failed for package ?SJava? * removing ?/usr/local/lib/R/site-library/SJava? michi at michi-laptop:~$ ---------------------------------------------------------------------- ------------------------------------------------- > sessionInfo() R version 2.10.1 (2009-12-14) i486-pc-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base > ---------------------------------------------------------------------- ------------------------------------------------- michi at michi-laptop:~$ java -version java version "1.6.0_16" Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) ---------------------------------------------------------------------- ------------------------------------------------- michi at michi-laptop:~$ uname -a Linux michi-laptop 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux Thanx again for reading that far ;) Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon: > On 1/19/10 8:58 AM, Martin Morgan wrote: >> Michael Dondrup wrote: >>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >>> >>>> Michael Dondrup wrote: >>>>> Hi, >>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>>> maybe not supported, but i hope it can be made working anyway. >>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>>> >>>>>> library(SJava) >>>>> Load the Java VM with .JavaInit() >>>>>> .JavaInit() >>>>>> example(.Java) >>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) >>>>> >>>>> .Java> .Java(v, "add", "A string element") >>>>> Error in .Java(v, "add", "A string element") : >>>>> Can't find org.omegahat.R.Java.RForeignReference >> >> this is in org.omegahat/Jars/RJava.jar, e.g., >> >> jar tf org.omegahat/Jars/RJava.jar >> > > Curious, as this jar did not appear on your classpath in your previous mail. > > I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path. > [snip]
ADD REPLY
0
Entering edit mode
Michael Dondrup wrote: > Hi, > I thought I could do a quick test on Ubuntu in my virtual box and compare, but that went even worse. I started on a > freshly installed R 2.10.1 (from CRAN) in ubuntu 9.04. Here are the details, any ideas? You're right, that's a lot worse. I've never seen that before, and jniParameters > > michi at michi-laptop:~$ sudo R CMD javareconf > Java interpreter : /usr/bin/java > Java version : 1.6.0_16 > Java home path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre > Java compiler : /usr/bin/javac > Java headers gen.: /usr/bin/javah > Java archive tool: /usr/bin/jar > Java library path: $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i38 6:$(JAVA_HOME)/../lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib > JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm > JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux > > Updating Java configuration in /etc/R > Done. > > michi at michi-laptop:~$ sudo R CMD INSTALL -c Desktop/SJava_0.73.0.tar.gz > * installing to library ?/usr/local/lib/R/site-library? > * installing *source* package ?SJava? ... > checking shlib support in R... checking Java support in R... present: > interpreter : '/usr/bin/java' > archiver : '/usr/bin/jar' > compiler : '/usr/bin/javac' > header prep.: '/usr/bin/javah' > cpp flags : '-I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include/linux' > java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/client -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386 -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm' > Looking in /usr/lib/jvm/java-6-sun-1.6.0.16/jre/include > Exception in thread "main" java.lang.NullPointerException > at jniParameters.findJniInclude(jniParameters.java:76) > at jniParameters.findJniInclude(jniParameters.java:61) > at jniParameters.compute(jniParameters.java:40) > at jniParameters.<init>(jniParameters.java:12) > at jniBashParameters.<init>(jniBashParameters.java:11) > at jniBashParameters.main(jniBashParameters.java:7) you might try editing SJava/configure.in to =================================================================== --- configure.in (revision 44070) +++ configure.in (working copy) @@ -99,7 +99,7 @@ dnl JDK_PLATFORM and JDK_HARDWARE (LD_LIBRARY_PATH= ; export LD_LIBRARY_PATH; \ - ${JAVA} -classpath . -DJavaHome=${JAVA_HOME} jniBashParameters config.jni) + ${JAVA} -verbose -classpath . -DJavaHome=${JAVA_HOME} jniBashParameters config.jni) dnl now read the results from the jniBashParameters output . ./config.jni (perhaps also adding some 'echo' lines in there to see what's going on) and then cd SJava && autconf && cd .. R CMD INSTALL --clean SJava or wait a bit and I'll get my hands on a mac and work on your initial problem first. Martin > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for Rf_initEmbeddedR in -lR... yes > configure: creating ./config.status > config.status: creating Makevars > config.status: creating src/Makevars > config.status: creating src/RSJava/Makefile > config.status: creating inst/scripts/RJava.bsh > config.status: creating inst/scripts/RJava.csh > config.status: creating cleanup > config.status: creating inst/scripts/RJava > Copying the cleanup script to the scripts/ directory > ** libs > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator > make -C RSJava > make[1]: Entering directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o OmegaInterfaceManager.h \ > org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager > gcc -std=gnu99 -I/usr/share/R/include -D_R_ -I/usr/lib/R/include -I/usr/lib/R/include/R_ext -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava -I. -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include/ -fpic -g -O2 -c CtoJava.c -o CtoJava.o > In file included from CtoJava.c:6: > CtoJava.h:9:17: error: jni.h: No such file or directory > In file included from CtoJava.c:6: > CtoJava.h:14: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?NullObject? > CtoJava.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?OmegahatInterfaceManagerClass? > CtoJava.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? > CtoJava.h:100: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:106: error: expected ?)? before ?Manager? > CtoJava.h:109: error: expected ?)? before ?*? token > CtoJava.h:112: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?RS_createForeignReference? > CtoJava.h:116: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getInterfaceManager? > CtoJava.h:117: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?setInterfaceManager? > CtoJava.h:120: error: expected declaration specifiers or ?...? before ?JNIEnv? > CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:126: error: expected ?)? before ?*? token > CtoJava.h:129: error: expected ?)? before ?*? token > CtoJava.h:137: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?findGetPrimitiveMethodID? > CtoJava.h:140: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:142: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:143: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:144: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:145: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?releaseThreadJNIEnv? > CtoJava.h:149: error: expected ?)? before ?*? token > CtoJava.h:150: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > In file included from CtoJava.c:8: > ErrorHandling.h:14: error: expected declaration specifiers or ?...? before ?JNIEnv? > ErrorHandling.h:19: error: expected declaration specifiers or ?...? before ?JNIEnv? > ErrorHandling.h:20: error: expected ?)? before ?*? token > ErrorHandling.h:21: error: expected ?)? before ?*? token > ErrorHandling.h:24: error: expected declaration specifiers or ?...? before ?jthrowable? > ErrorHandling.h:24: error: expected declaration specifiers or ?...? before ?JNIEnv? > ErrorHandling.h:27: error: expected ?)? before ?*? token > ErrorHandling.h:30: error: expected declaration specifiers or ?...? before ?JNIEnv? > In file included from CtoJava.c:9: > JNIUtils.h:12: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_method_id? > JNIUtils.h:16: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_object_class_name? > JNIUtils.h:19: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_java_class_name? > JNIUtils.h:23: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?VMNewStringArray? > JNIUtils.h:26: error: expected ?)? before ?obj? > In file included from CtoJava.c:13: > ManagerInterfaceUtils.h:12: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?callGenericOmegaMethod? > ManagerInterfaceUtils.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?callConstructorMethod? > ManagerInterfaceUtils.h:22: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?evalOmegaExpression? > ManagerInterfaceUtils.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_object_datatype? > ManagerInterfaceUtils.h:31: error: expected ?)? before ?OmegahatInterfaceManagerClass? > ManagerInterfaceUtils.h:35: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getOmegahatReferenceValue? > In file included from CtoJava.c:14: > OmegaInterfaceManager.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jboolean? > CtoJava.c:17: error: expected ?)? before ?*? token > CtoJava.c:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:38: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?vm1_args? > CtoJava.c:39: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?vm2_args? > CtoJava.c:41: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:47: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?interfaceManager? > CtoJava.c:63: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:70: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?doubleValueID? > CtoJava.c:73: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? > CtoJava.c:76: error: expected ?)? before ?Manager? > CtoJava.c:79: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?OmegahatInterfaceManagerClass? > CtoJava.c:80: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? > CtoJava.c:83: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?NullObject? > CtoJava.c:89: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?MetaForeignReferenceClass? > CtoJava.c:94: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?MetaForeignReferenceConstructorId? > CtoJava.c:96: error: expected ?)? before ?*? token > CtoJava.c:101: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?arrayClasses? > CtoJava.c:119: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?wrapperClasses? > CtoJava.c:120: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?wrapperConstructor? > CtoJava.c: In function ?interface_start_VM?: > CtoJava.c:164: error: too many arguments to function ?create_Java_vm? > CtoJava.c: At top level: > CtoJava.c:182: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c: In function ?create_Java_vm?: > CtoJava.c:184: error: ?jint? undeclared (first use in this function) > CtoJava.c:184: error: (Each undeclared identifier is reported only once > CtoJava.c:184: error: for each function it appears in.) > CtoJava.c:184: error: expected ?;? before ?res? > CtoJava.c:187: error: ?std_env? undeclared (first use in this function) > CtoJava.c:189: error: ?jvm? undeclared (first use in this function) > CtoJava.c:204: error: ?vm_args? undeclared (first use in this function) > CtoJava.c:204: error: ?JDK1_1InitArgs? undeclared (first use in this function) > CtoJava.c:204: error: expected expression before ?)? token > CtoJava.c:210: error: expected expression before ?)? token > CtoJava.c:210: error: ?vm1_args? undeclared (first use in this function) > CtoJava.c:211: error: ?JNI_VERSION_1_1? undeclared (first use in this function) > CtoJava.c:213: warning: implicit declaration of function ?JNI_GetDefaultJavaVMInitArgs? > CtoJava.c: At top level: > CtoJava.c:283: warning: data definition has no type or storage class > CtoJava.c:283: warning: type defaults to ?int? in declaration of ?tmp? > CtoJava.c:283: error: ?user_classpath? undeclared here (not in a function) > CtoJava.c:283: error: ?vm_args? undeclared here (not in a function) > CtoJava.c:283: warning: initialization makes integer from pointer without a cast > CtoJava.c:283: error: initializer element is not constant > CtoJava.c:285: warning: data definition has no type or storage class > CtoJava.c:285: warning: type defaults to ?int? in declaration of ?strcpy? > CtoJava.c:285: warning: parameter names (without types) in function declaration > CtoJava.c:285: error: conflicting types for ?strcpy? > CtoJava.c:286: error: expected ?)? before string constant > CtoJava.c:287: error: expected ?)? before ?->? token > CtoJava.c:288: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?->? token > CtoJava.c:291: error: expected identifier or ?(? before ?if? > CtoJava.c:298: error: expected identifier or ?(? before ?if? > CtoJava.c:305: error: expected identifier or ?(? before ?return? > CtoJava.c:306: error: expected identifier or ?(? before ?}? token > CtoJava.c: In function ?exists_Java_vm?: > CtoJava.c:311: error: ?std_env? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:316: error: expected ?)? before ?Manager? > CtoJava.c:354: error: expected ?)? before ?Manager? > CtoJava.c:475: error: expected ?)? before ?*? token > CtoJava.c:517: error: expected declaration specifiers or ?...? before ?JNIEnv? > CtoJava.c: In function ?whatJavaType?: > CtoJava.c:518: error: ?jobject? undeclared (first use in this function) > CtoJava.c:518: error: expected ?;? before ?obj? > CtoJava.c:519: error: ?obj? undeclared (first use in this function) > CtoJava.c:519: error: expected ?;? before ?javaObject? > CtoJava.c:526: error: ?env? undeclared (first use in this function) > CtoJava.c:526: error: ?arrayClasses? undeclared (first use in this function) > CtoJava.c:526: error: ?JNI_TRUE? undeclared (first use in this function) > CtoJava.c:530: error: ?primitiveClasses? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:552: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c:553: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c:553: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c: In function ?which_java_type?: > CtoJava.c:562: error: ?builtIn? undeclared (first use in this function) > CtoJava.c:563: error: ?JNI_TRUE? undeclared (first use in this function) > CtoJava.c:566: error: ?JNI_FALSE? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:708: error: expected ?)? before ?*? token > CtoJava.c:866: error: expected ?)? before ?*? token > CtoJava.c:1047: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1074: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1081: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1132: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?releaseThreadJNIEnv? > CtoJava.c:1152: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1159: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1166: error: expected ?)? before ?*? token > CtoJava.c: In function ?RS_JAVA_terminateJava?: > CtoJava.c:1174: error: ?JavaVM? undeclared (first use in this function) > CtoJava.c:1174: error: ?vm? undeclared (first use in this function) > CtoJava.c:1174: warning: implicit declaration of function ?getJavaVM? > CtoJava.c:1177: error: ?jvm? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:1184: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getInterfaceManager? > CtoJava.c:1188: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?setInterfaceManager? > CtoJava.c:1202: error: expected ?)? before ?*? token > CtoJava.c:1225: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?RS_createForeignReference? > CtoJava.c:1243: error: expected ?)? before ?*? token > CtoJava.c:1292: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?findGetPrimitiveMethodID? > make[1]: *** [CtoJava.o] Error 1 > make[1]: Leaving directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' > make: *** [subdir] Error 2 > ERROR: compilation failed for package ?SJava? > * removing ?/usr/local/lib/R/site-library/SJava? > michi at michi-laptop:~$ > > -------------------------------------------------------------------- --------------------------------------------------- >> sessionInfo() > R version 2.10.1 (2009-12-14) > i486-pc-linux-gnu > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=en_US.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > -------------------------------------------------------------------- --------------------------------------------------- > michi at michi-laptop:~$ java -version > java version "1.6.0_16" > Java(TM) SE Runtime Environment (build 1.6.0_16-b01) > Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) > > -------------------------------------------------------------------- --------------------------------------------------- > michi at michi-laptop:~$ uname -a > Linux michi-laptop 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux > > > Thanx again for reading that far ;) > > Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon: > >> On 1/19/10 8:58 AM, Martin Morgan wrote: >>> Michael Dondrup wrote: >>>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >>>> >>>>> Michael Dondrup wrote: >>>>>> Hi, >>>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>>>> maybe not supported, but i hope it can be made working anyway. >>>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>>>> >>>>>>> library(SJava) >>>>>> Load the Java VM with .JavaInit() >>>>>>> .JavaInit() >>>>>>> example(.Java) >>>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) >>>>>> >>>>>> .Java> .Java(v, "add", "A string element") >>>>>> Error in .Java(v, "add", "A string element") : >>>>>> Can't find org.omegahat.R.Java.RForeignReference >>> this is in org.omegahat/Jars/RJava.jar, e.g., >>> >>> jar tf org.omegahat/Jars/RJava.jar >>> >> Curious, as this jar did not appear on your classpath in your previous mail. >> >> I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path. >> > [snip] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD REPLY
0
Entering edit mode
Hi Michael, I have Ubuntu 9.10 and could install SJava doing the folowing: 1) The problem you have is on the JAVA_HOME variable as it can't find jni.h. due to the R java conf. Were it says "Looking in /usr/lib/jvm/java-6-sun-1.6.0.16/jre/include" should say "/usr/lib/jvm/java-6-sun-1.6.0.16/include". So you got the exception of java and the missing jni.h. On my configuration $sudo find / -name jni.h /usr/lib/jvm/java-6-sun-1.6.0.15/include/jni.h then set the JAVA_HOME $ export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.15 $ $JAVA_HOME bash: /usr/lib/jvm/java-6-sun-1.6.0.15: is a directory 2) Download SJava, untar and install with R $R CMD INSTALL SJava bla bla bla ... ** R ** inst cp: cannot overwrite directory `/usr/local/lib/R/library/SJava/libs' with non-directory sh: /bin/tarxf: not found ** preparing package for lazy loading Creating a new generic function for "merge" in "SJava" ** help *** installing help indices ** building package indices ... * DONE (SJava) 3) Try to run SJava with no luck $R > library(SJava) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/local/lib/R/library/SJava/libs/SJava.so': libjvm.so: cannot open shared object file: No such file or directory Error in library(SJava) : .First.lib failed for 'SJava' Now we are missing libjvm.so. Even if I set on the PATH variable or a symbolic link form SJava/libs directory, can't get it work. $ sudo find / -name libjvm.so /usr/lib/jvm/java-6-openjdk/jre/lib/i386/client/libjvm.so /usr/lib/jvm/java-6-openjdk/jre/lib/i386/cacao/libjvm.so /usr/lib/jvm/java-6-openjdk/jre/lib/i386/server/libjvm.so /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client/libjvm.so /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/server/libjvm.so the work around I found I to load the library before calling SJava. Someone else, may improve it. $R > dyn.load("/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client/libjv m.so") > library(SJava) Load the Java VM with .JavaInit() > Hope it works for you too, Kachelo 2010/1/20 Michael Dondrup <michael.dondrup@uni.no> > Hi, > I thought I could do a quick test on Ubuntu in my virtual box and compare, > but that went even worse. I started on a > freshly installed R 2.10.1 (from CRAN) in ubuntu 9.04. Here are the > details, any ideas? > > michi@michi-laptop:~$ sudo R CMD javareconf > Java interpreter : /usr/bin/java > Java version : 1.6.0_16 > Java home path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre > Java compiler : /usr/bin/javac > Java headers gen.: /usr/bin/javah > Java archive tool: /usr/bin/jar > Java library path: > $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../l ib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib > JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 > -L$(JAVA_HOME)/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib > -L/usr/lib -ljvm > JNI cpp flags : -I$(JAVA_HOME)/../include > -I$(JAVA_HOME)/../include/linux > > Updating Java configuration in /etc/R > Done. > > michi@michi-laptop:~$ sudo R CMD INSTALL -c Desktop/SJava_0.73.0.tar.gz > * installing to library ‘/usr/local/lib/R/site-library’ > * installing *source* package ‘SJava’ ... > checking shlib support in R... checking Java support in R... present: > interpreter : '/usr/bin/java' > archiver : '/usr/bin/jar' > compiler : '/usr/bin/javac' > header prep.: '/usr/bin/javah' > cpp flags : '-I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include > -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include/linux' > java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/client > -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386 > -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/i386 -L > -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm' > Looking in /usr/lib/jvm/java-6-sun-1.6.0.16/jre/include > Exception in thread "main" java.lang.NullPointerException > at jniParameters.findJniInclude(jniParameters.java:76) > at jniParameters.findJniInclude(jniParameters.java:61) > at jniParameters.compute(jniParameters.java:40) > at jniParameters.<init>(jniParameters.java:12) > at jniBashParameters.<init>(jniBashParameters.java:11) > at jniBashParameters.main(jniBashParameters.java:7) > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for Rf_initEmbeddedR in -lR... yes > configure: creating ./config.status > config.status: creating Makevars > config.status: creating src/Makevars > config.status: creating src/RSJava/Makefile > config.status: creating inst/scripts/RJava.bsh > config.status: creating inst/scripts/RJava.csh > config.status: creating cleanup > config.status: creating inst/scripts/RJava > Copying the cleanup script to the scripts/ directory > ** libs > /usr/bin/javah -classpath > /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTA LL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar > -o RForeignReference.h org.omegahat.R.Java.RForeignReference > /usr/bin/javah -classpath > /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTA LL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar > -o RManualFunctionActionListener.h > org.omegahat.R.Java.RManualFunctionActionListener > /usr/bin/javah -classpath > /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTA LL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar > -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter > /usr/bin/javah -classpath > /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTA LL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar > -o REvaluator.h org.omegahat.R.Java.REvaluator > make -C RSJava > make[1]: Entering directory > `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' > /usr/bin/javah -classpath > /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTA LL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar > -o OmegaInterfaceManager.h \ > org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager > gcc -std=gnu99 -I/usr/share/R/include -D_R_ -I/usr/lib/R/include > -I/usr/lib/R/include/R_ext > -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava -I. > -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/include > -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include > -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include/ -fpic -g -O2 -c CtoJava.c > -o CtoJava.o > In file included from CtoJava.c:6: > CtoJava.h:9:17: error: jni.h: No such file or directory > In file included from CtoJava.c:6: > CtoJava.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘NullObject’ > CtoJava.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘OmegahatInterfaceManagerClass’ > CtoJava.h:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘BasicClassValueAccessors’ > CtoJava.h:100: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.h:106: error: expected ‘)’ before ‘Manager’ > CtoJava.h:109: error: expected ‘)’ before ‘*’ token > CtoJava.h:112: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘RS_createForeignReference’ > CtoJava.h:116: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘getInterfaceManager’ > CtoJava.h:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘setInterfaceManager’ > CtoJava.h:120: error: expected declaration specifiers or ‘...’ before > ‘JNIEnv’ > CtoJava.h:123: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.h:123: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.h:123: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.h:126: error: expected ‘)’ before ‘*’ token > CtoJava.h:129: error: expected ‘)’ before ‘*’ token > CtoJava.h:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘findGetPrimitiveMethodID’ > CtoJava.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.h:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.h:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘releaseThreadJNIEnv’ > CtoJava.h:149: error: expected ‘)’ before ‘*’ token > CtoJava.h:150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > In file included from CtoJava.c:8: > ErrorHandling.h:14: error: expected declaration specifiers or ‘...’ before > ‘JNIEnv’ > ErrorHandling.h:19: error: expected declaration specifiers or ‘...’ before > ‘JNIEnv’ > ErrorHandling.h:20: error: expected ‘)’ before ‘*’ token > ErrorHandling.h:21: error: expected ‘)’ before ‘*’ token > ErrorHandling.h:24: error: expected declaration specifiers or ‘...’ before > ‘jthrowable’ > ErrorHandling.h:24: error: expected declaration specifiers or ‘...’ before > ‘JNIEnv’ > ErrorHandling.h:27: error: expected ‘)’ before ‘*’ token > ErrorHandling.h:30: error: expected declaration specifiers or ‘...’ before > ‘JNIEnv’ > In file included from CtoJava.c:9: > JNIUtils.h:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘get_method_id’ > JNIUtils.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘get_object_class_name’ > JNIUtils.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘get_java_class_name’ > JNIUtils.h:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘VMNewStringArray’ > JNIUtils.h:26: error: expected ‘)’ before ‘obj’ > In file included from CtoJava.c:13: > ManagerInterfaceUtils.h:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘callGenericOmegaMethod’ > ManagerInterfaceUtils.h:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘callConstructorMethod’ > ManagerInterfaceUtils.h:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘evalOmegaExpression’ > ManagerInterfaceUtils.h:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘get_object_datatype’ > ManagerInterfaceUtils.h:31: error: expected ‘)’ before > ‘OmegahatInterfaceManagerClass’ > ManagerInterfaceUtils.h:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘getOmegahatReferenceValue’ > In file included from CtoJava.c:14: > OmegaInterfaceManager.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘jboolean’ > CtoJava.c:17: error: expected ‘)’ before ‘*’ token > CtoJava.c:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘vm1_args’ > CtoJava.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘vm2_args’ > CtoJava.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘interfaceManager’ > CtoJava.c:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘doubleValueID’ > CtoJava.c:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘BasicClassValueAccessors’ > CtoJava.c:76: error: expected ‘)’ before ‘Manager’ > CtoJava.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘OmegahatInterfaceManagerClass’ > CtoJava.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘BasicClassValueAccessors’ > CtoJava.c:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘NullObject’ > CtoJava.c:89: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘MetaForeignReferenceClass’ > CtoJava.c:94: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘MetaForeignReferenceConstructorId’ > CtoJava.c:96: error: expected ‘)’ before ‘*’ token > CtoJava.c:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘arrayClasses’ > CtoJava.c:119: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘wrapperClasses’ > CtoJava.c:120: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘wrapperConstructor’ > CtoJava.c: In function ‘interface_start_VM’: > CtoJava.c:164: error: too many arguments to function ‘create_Java_vm’ > CtoJava.c: At top level: > CtoJava.c:182: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.c: In function ‘create_Java_vm’: > CtoJava.c:184: error: ‘jint’ undeclared (first use in this function) > CtoJava.c:184: error: (Each undeclared identifier is reported only once > CtoJava.c:184: error: for each function it appears in.) > CtoJava.c:184: error: expected ‘;’ before ‘res’ > CtoJava.c:187: error: ‘std_env’ undeclared (first use in this function) > CtoJava.c:189: error: ‘jvm’ undeclared (first use in this function) > CtoJava.c:204: error: ‘vm_args’ undeclared (first use in this function) > CtoJava.c:204: error: ‘JDK1_1InitArgs’ undeclared (first use in this > function) > CtoJava.c:204: error: expected expression before ‘)’ token > CtoJava.c:210: error: expected expression before ‘)’ token > CtoJava.c:210: error: ‘vm1_args’ undeclared (first use in this function) > CtoJava.c:211: error: ‘JNI_VERSION_1_1’ undeclared (first use in this > function) > CtoJava.c:213: warning: implicit declaration of function > ‘JNI_GetDefaultJavaVMInitArgs’ > CtoJava.c: At top level: > CtoJava.c:283: warning: data definition has no type or storage class > CtoJava.c:283: warning: type defaults to ‘int’ in declaration of ‘tmp’ > CtoJava.c:283: error: ‘user_classpath’ undeclared here (not in a function) > CtoJava.c:283: error: ‘vm_args’ undeclared here (not in a function) > CtoJava.c:283: warning: initialization makes integer from pointer without a > cast > CtoJava.c:283: error: initializer element is not constant > CtoJava.c:285: warning: data definition has no type or storage class > CtoJava.c:285: warning: type defaults to ‘int’ in declaration of ‘strcpy’ > CtoJava.c:285: warning: parameter names (without types) in function > declaration > CtoJava.c:285: error: conflicting types for ‘strcpy’ > CtoJava.c:286: error: expected ‘)’ before string constant > CtoJava.c:287: error: expected ‘)’ before ‘->’ token > CtoJava.c:288: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘->’ token > CtoJava.c:291: error: expected identifier or ‘(’ before ‘if’ > CtoJava.c:298: error: expected identifier or ‘(’ before ‘if’ > CtoJava.c:305: error: expected identifier or ‘(’ before ‘return’ > CtoJava.c:306: error: expected identifier or ‘(’ before ‘}’ token > CtoJava.c: In function ‘exists_Java_vm’: > CtoJava.c:311: error: ‘std_env’ undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:316: error: expected ‘)’ before ‘Manager’ > CtoJava.c:354: error: expected ‘)’ before ‘Manager’ > CtoJava.c:475: error: expected ‘)’ before ‘*’ token > CtoJava.c:517: error: expected declaration specifiers or ‘...’ before > ‘JNIEnv’ > CtoJava.c: In function ‘whatJavaType’: > CtoJava.c:518: error: ‘jobject’ undeclared (first use in this function) > CtoJava.c:518: error: expected ‘;’ before ‘obj’ > CtoJava.c:519: error: ‘obj’ undeclared (first use in this function) > CtoJava.c:519: error: expected ‘;’ before ‘javaObject’ > CtoJava.c:526: error: ‘env’ undeclared (first use in this function) > CtoJava.c:526: error: ‘arrayClasses’ undeclared (first use in this > function) > CtoJava.c:526: error: ‘JNI_TRUE’ undeclared (first use in this function) > CtoJava.c:530: error: ‘primitiveClasses’ undeclared (first use in this > function) > CtoJava.c: At top level: > CtoJava.c:552: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.c:553: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.c:553: error: expected declaration specifiers or ‘...’ before > ‘jboolean’ > CtoJava.c: In function ‘which_java_type’: > CtoJava.c:562: error: ‘builtIn’ undeclared (first use in this function) > CtoJava.c:563: error: ‘JNI_TRUE’ undeclared (first use in this function) > CtoJava.c:566: error: ‘JNI_FALSE’ undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:708: error: expected ‘)’ before ‘*’ token > CtoJava.c:866: error: expected ‘)’ before ‘*’ token > CtoJava.c:1047: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:1074: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:1081: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:1132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘releaseThreadJNIEnv’ > CtoJava.c:1152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:1159: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘*’ token > CtoJava.c:1166: error: expected ‘)’ before ‘*’ token > CtoJava.c: In function ‘RS_JAVA_terminateJava’: > CtoJava.c:1174: error: ‘JavaVM’ undeclared (first use in this function) > CtoJava.c:1174: error: ‘vm’ undeclared (first use in this function) > CtoJava.c:1174: warning: implicit declaration of function ‘getJavaVM’ > CtoJava.c:1177: error: ‘jvm’ undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:1184: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘getInterfaceManager’ > CtoJava.c:1188: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘setInterfaceManager’ > CtoJava.c:1202: error: expected ‘)’ before ‘*’ token > CtoJava.c:1225: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘RS_createForeignReference’ > CtoJava.c:1243: error: expected ‘)’ before ‘*’ token > CtoJava.c:1292: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘findGetPrimitiveMethodID’ > make[1]: *** [CtoJava.o] Error 1 > make[1]: Leaving directory > `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' > make: *** [subdir] Error 2 > ERROR: compilation failed for package ‘SJava’ > * removing ‘/usr/local/lib/R/site-library/SJava’ > michi@michi-laptop:~$ > > > -------------------------------------------------------------------- --------------------------------------------------- > > sessionInfo() > R version 2.10.1 (2009-12-14) > i486-pc-linux-gnu > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=en_US.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > > > -------------------------------------------------------------------- --------------------------------------------------- > michi@michi-laptop:~$ java -version > java version "1.6.0_16" > Java(TM) SE Runtime Environment (build 1.6.0_16-b01) > Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) > > > -------------------------------------------------------------------- --------------------------------------------------- > michi@michi-laptop:~$ uname -a > Linux michi-laptop 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC > 2009 i686 GNU/Linux > > > Thanx again for reading that far ;) > > Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon: > > > On 1/19/10 8:58 AM, Martin Morgan wrote: > >> Michael Dondrup wrote: > >>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: > >>> > >>>> Michael Dondrup wrote: > >>>>> Hi, > >>>>> I would like to use RWebServices and therefore SJava on Mac OS snow > leopard. The documentation does not explicitly mention Mac os, so it's > >>>>> maybe not supported, but i hope it can be made working anyway. > >>>>> Maybe somebody out there got this configuration running and could > help? I am trying to install SJava 0.72. I try the following: > >>>>> > >>>>>> library(SJava) > >>>>> Load the Java VM with .JavaInit() > >>>>>> .JavaInit() > >>>>>> example(.Java) > >>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) > >>>>> > >>>>> .Java> .Java(v, "add", "A string element") > >>>>> Error in .Java(v, "add", "A string element") : > >>>>> Can't find org.omegahat.R.Java.RForeignReference > >> > >> this is in org.omegahat/Jars/RJava.jar, e.g., > >> > >> jar tf org.omegahat/Jars/RJava.jar > >> > > > > Curious, as this jar did not appear on your classpath in your previous > mail. > > > > I'm able to reproduce the error on my Snow Leopard laptop. I also notice > that I don't have this jar. There are .class files under the package > structure in org/omegahat/R/Java/*.class. RForeignReference.class is among > them and this would seem to be the purpose of the "<...>/SJava/org/.." entry > in class path. > > > [snip] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
0
Entering edit mode
Thank you Cristobal and Martin, this is now working for me on ubuntu 9.04, your hints were correct! In summary, here are the two commands I used: > sudo JAVA_HOME=/usr/lib/jvm/java-6-sun/ R CMD INSTALL -c SJava_0.73.0.tar.gz (maybe there was a change in the path layout between java 5 and 6?) .... ** R ** inst cp: cannot overwrite directory `/usr/local/lib/R/site- library/SJava/libs' with non-directory ( > this does not seem to have any effect ) sh: /bin/tarxf: not found ( > probably meant "/bin/tar xf" ? ) ** preparing package for lazy loading Creating a new generic function for "merge" in "SJava" ** help ...... then: > export $LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun/jre/lib/i386/client/ ( this should maybe be automatic ?) > R > library(SJava) Load the Java VM with .JavaInit() > .JavaInit() > example(.Java) So, problem partially solved, thank you again Am Jan 20, 2010 um 3:58 PM schrieb Cristobal Fresno Rodr?guez: > Hi Michael, > I have Ubuntu 9.10 and could install SJava doing the folowing: > > 1) The problem you have is on the JAVA_HOME variable as it can't find jni.h. due to the R java conf. > Were it says "Looking in /usr/lib/jvm/java-6-sun-1.6.0.16/jre/include" should say "/usr/lib/jvm/java-6-sun-1.6.0.16/include". So you got the exception of java and the missing jni.h. > On my configuration > $sudo find / -name jni.h > /usr/lib/jvm/java-6-sun-1.6.0.15/include/jni.h > then set the JAVA_HOME > $ export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.15 > $ $JAVA_HOME > bash: /usr/lib/jvm/java-6-sun-1.6.0.15: is a directory > > 2) Download SJava, untar and install with R > $R CMD INSTALL SJava > bla bla bla ... > ** R > ** inst > cp: cannot overwrite directory `/usr/local/lib/R/library/SJava/libs' with non-directory > sh: /bin/tarxf: not found > ** preparing package for lazy loading > Creating a new generic function for "merge" in "SJava" > ** help > *** installing help indices > ** building package indices ... > * DONE (SJava) > > 3) Try to run SJava with no luck > $R > > library(SJava) > Error in dyn.load(file, DLLpath = DLLpath, ...) : > unable to load shared library '/usr/local/lib/R/library/SJava/libs/SJava.so': > libjvm.so: cannot open shared object file: No such file or directory > Error in library(SJava) : .First.lib failed for 'SJava' > > Now we are missing libjvm.so. Even if I set on the PATH variable or a symbolic link form SJava/libs directory, can't get it work. > $ sudo find / -name libjvm.so > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/client/libjvm.so > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/cacao/libjvm.so > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/server/libjvm.so > /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client/libjvm.so > /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/server/libjvm.so > > the work around I found I to load the library before calling SJava. Someone else, may improve it. > $R > > dyn.load("/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client/lib jvm.so") > > library(SJava) > Load the Java VM with .JavaInit() > > > > Hope it works for you too, > Kachelo > > 2010/1/20 Michael Dondrup <michael.dondrup at="" uni.no=""> > Hi, > I thought I could do a quick test on Ubuntu in my virtual box and compare, but that went even worse. I started on a > freshly installed R 2.10.1 (from CRAN) in ubuntu 9.04. Here are the details, any ideas? > > michi at michi-laptop:~$ sudo R CMD javareconf > Java interpreter : /usr/bin/java > Java version : 1.6.0_16 > Java home path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre > Java compiler : /usr/bin/javac > Java headers gen.: /usr/bin/javah > Java archive tool: /usr/bin/jar > Java library path: $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i38 6:$(JAVA_HOME)/../lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib > JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm > JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux > > Updating Java configuration in /etc/R > Done. > > michi at michi-laptop:~$ sudo R CMD INSTALL -c Desktop/SJava_0.73.0.tar.gz > * installing to library ?/usr/local/lib/R/site-library? > * installing *source* package ?SJava? ... > checking shlib support in R... checking Java support in R... present: > interpreter : '/usr/bin/java' > archiver : '/usr/bin/jar' > compiler : '/usr/bin/javac' > header prep.: '/usr/bin/javah' > cpp flags : '-I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include/linux' > java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/client -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386 -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm' > Looking in /usr/lib/jvm/java-6-sun-1.6.0.16/jre/include > Exception in thread "main" java.lang.NullPointerException > at jniParameters.findJniInclude(jniParameters.java:76) > at jniParameters.findJniInclude(jniParameters.java:61) > at jniParameters.compute(jniParameters.java:40) > at jniParameters.<init>(jniParameters.java:12) > at jniBashParameters.<init>(jniBashParameters.java:11) > at jniBashParameters.main(jniBashParameters.java:7) > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for Rf_initEmbeddedR in -lR... yes > configure: creating ./config.status > config.status: creating Makevars > config.status: creating src/Makevars > config.status: creating src/RSJava/Makefile > config.status: creating inst/scripts/RJava.bsh > config.status: creating inst/scripts/RJava.csh > config.status: creating cleanup > config.status: creating inst/scripts/RJava > Copying the cleanup script to the scripts/ directory > ** libs > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator > make -C RSJava > make[1]: Entering directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' > /usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/in st:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Envi ronment.jar -o OmegaInterfaceManager.h \ > org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager > gcc -std=gnu99 -I/usr/share/R/include -D_R_ -I/usr/lib/R/include -I/usr/lib/R/include/R_ext -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava -I. -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include/ -fpic -g -O2 -c CtoJava.c -o CtoJava.o > In file included from CtoJava.c:6: > CtoJava.h:9:17: error: jni.h: No such file or directory > In file included from CtoJava.c:6: > CtoJava.h:14: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?NullObject? > CtoJava.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?OmegahatInterfaceManagerClass? > CtoJava.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? > CtoJava.h:100: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:106: error: expected ?)? before ?Manager? > CtoJava.h:109: error: expected ?)? before ?*? token > CtoJava.h:112: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?RS_createForeignReference? > CtoJava.h:116: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getInterfaceManager? > CtoJava.h:117: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?setInterfaceManager? > CtoJava.h:120: error: expected declaration specifiers or ?...? before ?JNIEnv? > CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:123: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.h:126: error: expected ?)? before ?*? token > CtoJava.h:129: error: expected ?)? before ?*? token > CtoJava.h:137: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?findGetPrimitiveMethodID? > CtoJava.h:140: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:142: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:143: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:144: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.h:145: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?releaseThreadJNIEnv? > CtoJava.h:149: error: expected ?)? before ?*? token > CtoJava.h:150: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > In file included from CtoJava.c:8: > ErrorHandling.h:14: error: expected declaration specifiers or ?...? before ?JNIEnv? > ErrorHandling.h:19: error: expected declaration specifiers or ?...? before ?JNIEnv? > ErrorHandling.h:20: error: expected ?)? before ?*? token > ErrorHandling.h:21: error: expected ?)? before ?*? token > ErrorHandling.h:24: error: expected declaration specifiers or ?...? before ?jthrowable? > ErrorHandling.h:24: error: expected declaration specifiers or ?...? before ?JNIEnv? > ErrorHandling.h:27: error: expected ?)? before ?*? token > ErrorHandling.h:30: error: expected declaration specifiers or ?...? before ?JNIEnv? > In file included from CtoJava.c:9: > JNIUtils.h:12: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_method_id? > JNIUtils.h:16: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_object_class_name? > JNIUtils.h:19: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_java_class_name? > JNIUtils.h:23: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?VMNewStringArray? > JNIUtils.h:26: error: expected ?)? before ?obj? > In file included from CtoJava.c:13: > ManagerInterfaceUtils.h:12: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?callGenericOmegaMethod? > ManagerInterfaceUtils.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?callConstructorMethod? > ManagerInterfaceUtils.h:22: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?evalOmegaExpression? > ManagerInterfaceUtils.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?get_object_datatype? > ManagerInterfaceUtils.h:31: error: expected ?)? before ?OmegahatInterfaceManagerClass? > ManagerInterfaceUtils.h:35: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getOmegahatReferenceValue? > In file included from CtoJava.c:14: > OmegaInterfaceManager.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jboolean? > CtoJava.c:17: error: expected ?)? before ?*? token > CtoJava.c:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:38: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?vm1_args? > CtoJava.c:39: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?vm2_args? > CtoJava.c:41: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:47: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?interfaceManager? > CtoJava.c:63: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:70: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?doubleValueID? > CtoJava.c:73: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? > CtoJava.c:76: error: expected ?)? before ?Manager? > CtoJava.c:79: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?OmegahatInterfaceManagerClass? > CtoJava.c:80: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?BasicClassValueAccessors? > CtoJava.c:83: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?NullObject? > CtoJava.c:89: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?MetaForeignReferenceClass? > CtoJava.c:94: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?MetaForeignReferenceConstructorId? > CtoJava.c:96: error: expected ?)? before ?*? token > CtoJava.c:101: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?arrayClasses? > CtoJava.c:119: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?wrapperClasses? > CtoJava.c:120: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?wrapperConstructor? > CtoJava.c: In function ?interface_start_VM?: > CtoJava.c:164: error: too many arguments to function ?create_Java_vm? > CtoJava.c: At top level: > CtoJava.c:182: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c: In function ?create_Java_vm?: > CtoJava.c:184: error: ?jint? undeclared (first use in this function) > CtoJava.c:184: error: (Each undeclared identifier is reported only once > CtoJava.c:184: error: for each function it appears in.) > CtoJava.c:184: error: expected ?;? before ?res? > CtoJava.c:187: error: ?std_env? undeclared (first use in this function) > CtoJava.c:189: error: ?jvm? undeclared (first use in this function) > CtoJava.c:204: error: ?vm_args? undeclared (first use in this function) > CtoJava.c:204: error: ?JDK1_1InitArgs? undeclared (first use in this function) > CtoJava.c:204: error: expected expression before ?)? token > CtoJava.c:210: error: expected expression before ?)? token > CtoJava.c:210: error: ?vm1_args? undeclared (first use in this function) > CtoJava.c:211: error: ?JNI_VERSION_1_1? undeclared (first use in this function) > CtoJava.c:213: warning: implicit declaration of function ?JNI_GetDefaultJavaVMInitArgs? > CtoJava.c: At top level: > CtoJava.c:283: warning: data definition has no type or storage class > CtoJava.c:283: warning: type defaults to ?int? in declaration of ?tmp? > CtoJava.c:283: error: ?user_classpath? undeclared here (not in a function) > CtoJava.c:283: error: ?vm_args? undeclared here (not in a function) > CtoJava.c:283: warning: initialization makes integer from pointer without a cast > CtoJava.c:283: error: initializer element is not constant > CtoJava.c:285: warning: data definition has no type or storage class > CtoJava.c:285: warning: type defaults to ?int? in declaration of ?strcpy? > CtoJava.c:285: warning: parameter names (without types) in function declaration > CtoJava.c:285: error: conflicting types for ?strcpy? > CtoJava.c:286: error: expected ?)? before string constant > CtoJava.c:287: error: expected ?)? before ?->? token > CtoJava.c:288: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?->? token > CtoJava.c:291: error: expected identifier or ?(? before ?if? > CtoJava.c:298: error: expected identifier or ?(? before ?if? > CtoJava.c:305: error: expected identifier or ?(? before ?return? > CtoJava.c:306: error: expected identifier or ?(? before ?}? token > CtoJava.c: In function ?exists_Java_vm?: > CtoJava.c:311: error: ?std_env? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:316: error: expected ?)? before ?Manager? > CtoJava.c:354: error: expected ?)? before ?Manager? > CtoJava.c:475: error: expected ?)? before ?*? token > CtoJava.c:517: error: expected declaration specifiers or ?...? before ?JNIEnv? > CtoJava.c: In function ?whatJavaType?: > CtoJava.c:518: error: ?jobject? undeclared (first use in this function) > CtoJava.c:518: error: expected ?;? before ?obj? > CtoJava.c:519: error: ?obj? undeclared (first use in this function) > CtoJava.c:519: error: expected ?;? before ?javaObject? > CtoJava.c:526: error: ?env? undeclared (first use in this function) > CtoJava.c:526: error: ?arrayClasses? undeclared (first use in this function) > CtoJava.c:526: error: ?JNI_TRUE? undeclared (first use in this function) > CtoJava.c:530: error: ?primitiveClasses? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:552: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c:553: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c:553: error: expected declaration specifiers or ?...? before ?jboolean? > CtoJava.c: In function ?which_java_type?: > CtoJava.c:562: error: ?builtIn? undeclared (first use in this function) > CtoJava.c:563: error: ?JNI_TRUE? undeclared (first use in this function) > CtoJava.c:566: error: ?JNI_FALSE? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:708: error: expected ?)? before ?*? token > CtoJava.c:866: error: expected ?)? before ?*? token > CtoJava.c:1047: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1074: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1081: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1132: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?releaseThreadJNIEnv? > CtoJava.c:1152: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1159: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token > CtoJava.c:1166: error: expected ?)? before ?*? token > CtoJava.c: In function ?RS_JAVA_terminateJava?: > CtoJava.c:1174: error: ?JavaVM? undeclared (first use in this function) > CtoJava.c:1174: error: ?vm? undeclared (first use in this function) > CtoJava.c:1174: warning: implicit declaration of function ?getJavaVM? > CtoJava.c:1177: error: ?jvm? undeclared (first use in this function) > CtoJava.c: At top level: > CtoJava.c:1184: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?getInterfaceManager? > CtoJava.c:1188: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?setInterfaceManager? > CtoJava.c:1202: error: expected ?)? before ?*? token > CtoJava.c:1225: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?RS_createForeignReference? > CtoJava.c:1243: error: expected ?)? before ?*? token > CtoJava.c:1292: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?findGetPrimitiveMethodID? > make[1]: *** [CtoJava.o] Error 1 > make[1]: Leaving directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava' > make: *** [subdir] Error 2 > ERROR: compilation failed for package ?SJava? > * removing ?/usr/local/lib/R/site-library/SJava? > michi at michi-laptop:~$ > > -------------------------------------------------------------------- --------------------------------------------------- > > sessionInfo() > R version 2.10.1 (2009-12-14) > i486-pc-linux-gnu > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=en_US.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > > -------------------------------------------------------------------- --------------------------------------------------- > michi at michi-laptop:~$ java -version > java version "1.6.0_16" > Java(TM) SE Runtime Environment (build 1.6.0_16-b01) > Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) > > -------------------------------------------------------------------- --------------------------------------------------- > michi at michi-laptop:~$ uname -a > Linux michi-laptop 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux > > > Thanx again for reading that far ;) > > Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon: > > > On 1/19/10 8:58 AM, Martin Morgan wrote: > >> Michael Dondrup wrote: > >>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: > >>> > >>>> Michael Dondrup wrote: > >>>>> Hi, > >>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's > >>>>> maybe not supported, but i hope it can be made working anyway. > >>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: > >>>>> > >>>>>> library(SJava) > >>>>> Load the Java VM with .JavaInit() > >>>>>> .JavaInit() > >>>>>> example(.Java) > >>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) > >>>>> > >>>>> .Java> .Java(v, "add", "A string element") > >>>>> Error in .Java(v, "add", "A string element") : > >>>>> Can't find org.omegahat.R.Java.RForeignReference > >> > >> this is in org.omegahat/Jars/RJava.jar, e.g., > >> > >> jar tf org.omegahat/Jars/RJava.jar > >> > > > > Curious, as this jar did not appear on your classpath in your previous mail. > > > > I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path. > > > [snip] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY
0
Entering edit mode
Hi, this is just an update. After having it running on Linux, I thought I could debug around in the mac install, maybe it helps to isolate the problem. here is what I tried so far to rule out any simple error: -- First question: where does the error message come from? function is isRReference in RReferenceCall.c: /* #line 378 "RReferenceCall.cweb" */ jboolean isRReference(jobject obj, JNIEnv *env) { jclass klass; jboolean ans; klass = VMENV FindClass(env, "org/omegahat/R/Java/RForeignReference"); if(!klass) { PROBLEM "Can't find org.omegahat.R.Java.RForeignReference" ERROR; } ans = VMENV IsInstanceOf(env, obj, klass); //XX Do we need to release this klass. return(ans); } conclusion: FindClass does not find it. (So I would like to inspect the "env" variable, but don't know how to do this.) -- Then, where is that class org.omegahat.R.Java.RForeignReference? This class is compiled from /SJava/inst/org/omegahat/R/Java/RForeignReference.java and installed to /Library/Frameworks/R.framework/Versions/2.10/Resources/library/SJava/ org/omegahat/R/Java/ Does it contain the class? Yes: $ javap -classpath . RForeignReference Compiled from "RForeignReference.java" public class org.omegahat.R.Java.RForeignReference extends org.omegahat.Interfaces.NativeInterface.ForeignReference{ static boolean LoadLibrary; public org.omegahat.R.Java.RForeignReference(java.lang.String); public org.omegahat.R.Java.RForeignReference(java.lang.String, org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager); public org.omegahat.R.Java.RForeignReference(org.omegahat.Interfac es.NativeInterface.ForeignReference); public org.omegahat.R.Java.RForeignReference(org.omegahat.Interfac es.NativeInterface.ForeignReference, org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager); public java.lang.Object localEval(org.omegahat.Environment.Parser.Parse.List, java.lang.String, java.lang.String, java.lang.String[]) throws java.lang.Exception; public native java.lang.Object reval(java.lang.String, java.lang.Object[], java.lang.String, java.lang.String, java.lang.String[]); static {}; } -- Is it on the classpath? Add this path explicitly to $CLASSPATH and set it during .JavaInit and turned on verbose=T: Didn't work, looks as if the classpath setting is ignored. > .JavaInit(default=javaConfig(classPath=c("/Library/Frameworks/R.fram ework/Versions/2.10/Resources/library/SJava/org/omegahat/R/Java/", javaConfig()@classPath)), verbose=T) An object of class "JavaConfiguration" Slot "classPath": [1] "/Library/Frameworks/R.framework/Versions/2.10/Resources/library/S Java/org/omegahat/R/Java/:/Library/Frameworks/R.framework/Resources/li brary/SJava/org/omegahat/Jars/Environment.jar:/Library/Frameworks/R.fr amework/Resources/library/SJava/org/..:/Library/Frameworks/R.framework /Resources/library/SJava/org/omegahat/Jars/antlr.jar:/Library/Framewor ks/R.framework/Resources/library/SJava/org/omegahat/Jars/jas.jar:/Libr ary/Frameworks/R.framework/Resources/library/SJava/org/omegahat/Jars/j hall.jar" Slot "libraryPath": [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" Slot "properties": [1] "-DEmbeddedInR=true" [2] "-DInterfaceManagerClass=org/omegahat/Interfaces/NativeInterface/O megaInterfaceManager" [3] "-DForeignReferenceBaseClass=org/omegahat/R/Java/RJavaInstance" [4] "-Djava.compiler=NONE" [5] "-DOMEGA_HOME=/Library/Frameworks/R.framework/Resources/library/SJ ava/org/omegahat" [6] "-DOmegahatSearchPath=.,${OMEGA_HOME}/Environment/Scripts/Run,${OM EGA_HOME}/Jars/Environment.jar" [7] "-Djava.library.path=/Library/Frameworks/R.framework/Resources/lib rary/SJava/libs" Slot "options": character(0) Slot "args": character(0) Got it > example(.Java) .... Error in .Java(v, "add", "A string element") : Can't find org.omegahat.R.Java.RForeignReference -- Put all classes into a jar file and added the jar file to the class path in .JavaInit Didn't work. So I'm giving up for now. Would really like to have this work and in principle it should, but something seems to be very odd on the mac :( Thank you again, and sorry for this lengthy email. Best Michael Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon: > On 1/19/10 8:58 AM, Martin Morgan wrote: >> Michael Dondrup wrote: >>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >>> >>>> Michael Dondrup wrote: >>>>> Hi, >>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>>> maybe not supported, but i hope it can be made working anyway. >>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>>> >>>>>> library(SJava) >>>>> Load the Java VM with .JavaInit() >>>>>> .JavaInit() >>>>>> example(.Java) >>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) >>>>> >>>>> .Java> .Java(v, "add", "A string element") >>>>> Error in .Java(v, "add", "A string element") : >>>>> Can't find org.omegahat.R.Java.RForeignReference >> >> this is in org.omegahat/Jars/RJava.jar, e.g., >> >> jar tf org.omegahat/Jars/RJava.jar >> > > Curious, as this jar did not appear on your classpath in your previous mail. > > I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path. > >> more below... >>> Here is the output of javaConfig(). >>> >>>> javaConfig() >>> An object of class "JavaConfiguration" >>> Slot "classPath": >>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/Environment.jar" >>> [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." >>> [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/antlr.jar" >>> [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/jas.jar" >>> [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/jhall.jar" >>> >>> Slot "libraryPath": >>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >>> >>> Slot "properties": >>> EmbeddedInR >>> "true" >>> InterfaceManagerClass >>> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" >>> ForeignReferenceBaseClass >>> "org/omegahat/R/Java/RJavaInstance" >>> java.compiler >>> "NONE" >>> OMEGA_HOME >>> "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" >>> OmegahatSearchPath >>> ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Enviro nment.jar" >> >> My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded > > Mine is not expanded. I tried expanding it, but that didn't seem to make a difference either. :-( > > > -- > Seth Falcon > Bioconductor Core Team | FHCRC > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Hi all, Michael, your debugging details inspired me and this morning Martin and had some time to dig for a solution. There were a couple of issues. The FindClass call was failing because the RForeignReference class depends on native code and the required "DLL" was not being found. The reason the "DLL" was not being found was because the wrong path was being set for java.library.path -- R now uses an architecture-specific subdirectory of $PACKAGE/libs (e.g. $PACKAGE/libs/x86_64). In addition, Java is looking for a .dylib not a .so. In any case, we've updated the source for SJava in svn, and you can checkout the latest to give it a try: svn co --username=readonly \ --passowrd=readonly \ https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SJava Please let us know if it works for you. There are still some outstanding issues on OS X. In particular, GUI code that uses the AWT classes are not currently working. + seth On 1/21/10 7:44 AM, Michael Dondrup wrote: > Hi, > this is just an update. After having it running on Linux, I thought I could debug around in the mac install, > maybe it helps to isolate the problem. here is what I tried so far to rule out any simple error: > > -- First question: where does the error message come from? > > function is isRReference in RReferenceCall.c: > > /* #line 378 "RReferenceCall.cweb" */ > jboolean > isRReference(jobject obj, JNIEnv *env) > { > jclass klass; > jboolean ans; > klass = VMENV FindClass(env, "org/omegahat/R/Java/RForeignReference"); > if(!klass) { > PROBLEM "Can't find org.omegahat.R.Java.RForeignReference" > ERROR; > } > ans = VMENV IsInstanceOf(env, obj, klass); > //XX Do we need to release this klass. > > return(ans); > } > > conclusion: FindClass does not find it. > (So I would like to inspect the "env" variable, but don't know how to do this.) > > -- Then, where is that class org.omegahat.R.Java.RForeignReference? > This class is compiled from /SJava/inst/org/omegahat/R/Java/RForeignReference.java and installed to > /Library/Frameworks/R.framework/Versions/2.10/Resources/library/SJav a/org/omegahat/R/Java/ > Does it contain the class? Yes: > > $ javap -classpath . RForeignReference > Compiled from "RForeignReference.java" > public class org.omegahat.R.Java.RForeignReference extends org.omegahat.Interfaces.NativeInterface.ForeignReference{ > static boolean LoadLibrary; > public org.omegahat.R.Java.RForeignReference(java.lang.String); > public org.omegahat.R.Java.RForeignReference(java.lang.String, org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager); > public org.omegahat.R.Java.RForeignReference(org.omegahat.Inter faces.NativeInterface.ForeignReference); > public org.omegahat.R.Java.RForeignReference(org.omegahat.Inter faces.NativeInterface.ForeignReference, org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager); > public java.lang.Object localEval(org.omegahat.Environment.Parser.Parse.List, java.lang.String, java.lang.String, java.lang.String[]) throws java.lang.Exception; > public native java.lang.Object reval(java.lang.String, java.lang.Object[], java.lang.String, java.lang.String, java.lang.String[]); > static {}; > } > > -- Is it on the classpath? Add this path explicitly to $CLASSPATH and set it during .JavaInit and turned on verbose=T: > Didn't work, looks as if the classpath setting is ignored. > >> .JavaInit(default=javaConfig(classPath=c("/Library/Frameworks/R.fra mework/Versions/2.10/Resources/library/SJava/org/omegahat/R/Java/", javaConfig()@classPath)), verbose=T) > An object of class "JavaConfiguration" > Slot "classPath": > [1] "/Library/Frameworks/R.framework/Versions/2.10/Resources/library /SJava/org/omegahat/R/Java/:/Library/Frameworks/R.framework/Resources/ library/SJava/org/omegahat/Jars/Environment.jar:/Library/Frameworks/R. framework/Resources/library/SJava/org/..:/Library/Frameworks/R.framewo rk/Resources/library/SJava/org/omegahat/Jars/antlr.jar:/Library/Framew orks/R.framework/Resources/library/SJava/org/omegahat/Jars/jas.jar:/Li brary/Frameworks/R.framework/Resources/library/SJava/org/omegahat/Jars /jhall.jar" > > Slot "libraryPath": > [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" > > Slot "properties": > [1] "-DEmbeddedInR=true" > [2] "-DInterfaceManagerClass=org/omegahat/Interfaces/NativeInterface /OmegaInterfaceManager" > [3] "-DForeignReferenceBaseClass=org/omegahat/R/Java/RJavaInstance" > [4] "-Djava.compiler=NONE" > [5] "-DOMEGA_HOME=/Library/Frameworks/R.framework/Resources/library/ SJava/org/omegahat" > [6] "-DOmegahatSearchPath=.,${OMEGA_HOME}/Environment/Scripts/Run,${ OMEGA_HOME}/Jars/Environment.jar" > [7] "-Djava.library.path=/Library/Frameworks/R.framework/Resources/l ibrary/SJava/libs" > > Slot "options": > character(0) > > Slot "args": > character(0) > > Got it > >> example(.Java) > .... > Error in .Java(v, "add", "A string element") : > Can't find org.omegahat.R.Java.RForeignReference > > > -- Put all classes into a jar file and added the jar file to the class path in .JavaInit > Didn't work. > > > So I'm giving up for now. Would really like to have this work and in principle it should, but something seems to be very odd on the mac :( > > Thank you again, and sorry for this lengthy email. > > > Best > Michael > > > > > > Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon: > >> On 1/19/10 8:58 AM, Martin Morgan wrote: >>> Michael Dondrup wrote: >>>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >>>> >>>>> Michael Dondrup wrote: >>>>>> Hi, >>>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>>>> maybe not supported, but i hope it can be made working anyway. >>>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>>>> >>>>>>> library(SJava) >>>>>> Load the Java VM with .JavaInit() >>>>>>> .JavaInit() >>>>>>> example(.Java) >>>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) >>>>>> >>>>>> .Java> .Java(v, "add", "A string element") >>>>>> Error in .Java(v, "add", "A string element") : >>>>>> Can't find org.omegahat.R.Java.RForeignReference >>> >>> this is in org.omegahat/Jars/RJava.jar, e.g., >>> >>> jar tf org.omegahat/Jars/RJava.jar >>> >> >> Curious, as this jar did not appear on your classpath in your previous mail. >> >> I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path. >> >>> more below... >>>> Here is the output of javaConfig(). >>>> >>>>> javaConfig() >>>> An object of class "JavaConfiguration" >>>> Slot "classPath": >>>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ omegahat/Jars/Environment.jar" >>>> [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." >>>> [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ omegahat/Jars/antlr.jar" >>>> [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ omegahat/Jars/jas.jar" >>>> [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/ omegahat/Jars/jhall.jar" >>>> >>>> Slot "libraryPath": >>>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >>>> >>>> Slot "properties": >>>> EmbeddedInR >>>> "true" >>>> InterfaceManagerClass >>>> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" >>>> ForeignReferenceBaseClass >>>> "org/omegahat/R/Java/RJavaInstance" >>>> java.compiler >>>> "NONE" >>>> OMEGA_HOME >>>> "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" >>>> OmegahatSearchPath >>>> ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Envir onment.jar" >>> >>> My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded >> >> Mine is not expanded. I tried expanding it, but that didn't seem to make a difference either. :-( >> >> >> -- >> Seth Falcon >> Bioconductor Core Team | FHCRC >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Seth Falcon | @sfalcon | http://userprimary.net/user
ADD REPLY
0
Entering edit mode
Dear Seth and Martin, this is great news. Thank you very much for this effort. I tried it and it works without problem in R started in a terminal. If I use the R-GUI however, I get: [R.app GUI 1.31 (5537) i386-apple-darwin9.8.0] > library(SJava) Error: package 'SJava' is not installed for 'arch=i386' That's where it doesnt work: > sessionInfo() R version 2.10.1 (2009-12-14) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base > That's where it works: > sessionInfo() R version 2.10.1 (2009-12-14) x86_64-apple-darwin9.8.0 locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base > Looks like another architecture dependent issue, as if this code is only installed for the 64bit version of R. Anyway, it is really great that it's working, so I can try advance to use RWebServices :) Whenever I can test something, pls let me know. Best Michael Am Jan 21, 2010 um 8:26 PM schrieb Seth Falcon: > Hi all, > > Michael, your debugging details inspired me and this morning Martin and had some time to dig for a solution. > > There were a couple of issues. The FindClass call was failing because the RForeignReference class depends on native code and the required "DLL" was not being found. The reason the "DLL" was not being found was because the wrong path was being set for java.library.path -- R now uses an architecture-specific subdirectory of $PACKAGE/libs (e.g. $PACKAGE/libs/x86_64). In addition, Java is looking for a .dylib not a .so. > > In any case, we've updated the source for SJava in svn, and you can checkout the latest to give it a try: > > svn co --username=readonly \ > --passowrd=readonly \ > https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SJava > > Please let us know if it works for you. > > There are still some outstanding issues on OS X. In particular, GUI code that uses the AWT classes are not currently working. > > + seth > > > On 1/21/10 7:44 AM, Michael Dondrup wrote: >> Hi, >> this is just an update. After having it running on Linux, I thought I could debug around in the mac install, >> maybe it helps to isolate the problem. here is what I tried so far to rule out any simple error: >> >> -- First question: where does the error message come from? >> >> function is isRReference in RReferenceCall.c: >> >> /* #line 378 "RReferenceCall.cweb" */ >> jboolean >> isRReference(jobject obj, JNIEnv *env) >> { >> jclass klass; >> jboolean ans; >> klass = VMENV FindClass(env, "org/omegahat/R/Java/RForeignReference"); >> if(!klass) { >> PROBLEM "Can't find org.omegahat.R.Java.RForeignReference" >> ERROR; >> } >> ans = VMENV IsInstanceOf(env, obj, klass); >> //XX Do we need to release this klass. >> >> return(ans); >> } >> >> conclusion: FindClass does not find it. >> (So I would like to inspect the "env" variable, but don't know how to do this.) >> >> -- Then, where is that class org.omegahat.R.Java.RForeignReference? >> This class is compiled from /SJava/inst/org/omegahat/R/Java/RForeignReference.java and installed to >> /Library/Frameworks/R.framework/Versions/2.10/Resources/library/SJa va/org/omegahat/R/Java/ >> Does it contain the class? Yes: >> >> $ javap -classpath . RForeignReference >> Compiled from "RForeignReference.java" >> public class org.omegahat.R.Java.RForeignReference extends org.omegahat.Interfaces.NativeInterface.ForeignReference{ >> static boolean LoadLibrary; >> public org.omegahat.R.Java.RForeignReference(java.lang.String); >> public org.omegahat.R.Java.RForeignReference(java.lang.String, org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager); >> public org.omegahat.R.Java.RForeignReference(org.omegahat.Inter faces.NativeInterface.ForeignReference); >> public org.omegahat.R.Java.RForeignReference(org.omegahat.Inter faces.NativeInterface.ForeignReference, org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager); >> public java.lang.Object localEval(org.omegahat.Environment.Parser.Parse.List, java.lang.String, java.lang.String, java.lang.String[]) throws java.lang.Exception; >> public native java.lang.Object reval(java.lang.String, java.lang.Object[], java.lang.String, java.lang.String, java.lang.String[]); >> static {}; >> } >> >> -- Is it on the classpath? Add this path explicitly to $CLASSPATH and set it during .JavaInit and turned on verbose=T: >> Didn't work, looks as if the classpath setting is ignored. >> >>> .JavaInit(default=javaConfig(classPath=c("/Library/Frameworks/R.fr amework/Versions/2.10/Resources/library/SJava/org/omegahat/R/Java/", javaConfig()@classPath)), verbose=T) >> An object of class "JavaConfiguration" >> Slot "classPath": >> [1] "/Library/Frameworks/R.framework/Versions/2.10/Resources/librar y/SJava/org/omegahat/R/Java/:/Library/Frameworks/R.framework/Resources /library/SJava/org/omegahat/Jars/Environment.jar:/Library/Frameworks/R .framework/Resources/library/SJava/org/..:/Library/Frameworks/R.framew ork/Resources/library/SJava/org/omegahat/Jars/antlr.jar:/Library/Frame works/R.framework/Resources/library/SJava/org/omegahat/Jars/jas.jar:/L ibrary/Frameworks/R.framework/Resources/library/SJava/org/omegahat/Jar s/jhall.jar" >> >> Slot "libraryPath": >> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >> >> Slot "properties": >> [1] "-DEmbeddedInR=true" >> [2] "-DInterfaceManagerClass=org/omegahat/Interfaces/NativeInterfac e/OmegaInterfaceManager" >> [3] "-DForeignReferenceBaseClass=org/omegahat/R/Java/RJavaInstance" >> [4] "-Djava.compiler=NONE" >> [5] "-DOMEGA_HOME=/Library/Frameworks/R.framework/Resources/library /SJava/org/omegahat" >> [6] "-DOmegahatSearchPath=.,${OMEGA_HOME}/Environment/Scripts/Run,$ {OMEGA_HOME}/Jars/Environment.jar" >> [7] "-Djava.library.path=/Library/Frameworks/R.framework/Resources/ library/SJava/libs" >> >> Slot "options": >> character(0) >> >> Slot "args": >> character(0) >> >> Got it >> >>> example(.Java) >> .... >> Error in .Java(v, "add", "A string element") : >> Can't find org.omegahat.R.Java.RForeignReference >> >> >> -- Put all classes into a jar file and added the jar file to the class path in .JavaInit >> Didn't work. >> >> >> So I'm giving up for now. Would really like to have this work and in principle it should, but something seems to be very odd on the mac :( >> >> Thank you again, and sorry for this lengthy email. >> >> >> Best >> Michael >> >> >> >> >> >> Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon: >> >>> On 1/19/10 8:58 AM, Martin Morgan wrote: >>>> Michael Dondrup wrote: >>>>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >>>>> >>>>>> Michael Dondrup wrote: >>>>>>> Hi, >>>>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>>>>> maybe not supported, but i hope it can be made working anyway. >>>>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>>>>> >>>>>>>> library(SJava) >>>>>>> Load the Java VM with .JavaInit() >>>>>>>> .JavaInit() >>>>>>>> example(.Java) >>>>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10)) >>>>>>> >>>>>>> .Java> .Java(v, "add", "A string element") >>>>>>> Error in .Java(v, "add", "A string element") : >>>>>>> Can't find org.omegahat.R.Java.RForeignReference >>>> >>>> this is in org.omegahat/Jars/RJava.jar, e.g., >>>> >>>> jar tf org.omegahat/Jars/RJava.jar >>>> >>> >>> Curious, as this jar did not appear on your classpath in your previous mail. >>> >>> I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path. >>> >>>> more below... >>>>> Here is the output of javaConfig(). >>>>> >>>>>> javaConfig() >>>>> An object of class "JavaConfiguration" >>>>> Slot "classPath": >>>>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org /omegahat/Jars/Environment.jar" >>>>> [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." >>>>> [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org /omegahat/Jars/antlr.jar" >>>>> [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org /omegahat/Jars/jas.jar" >>>>> [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org /omegahat/Jars/jhall.jar" >>>>> >>>>> Slot "libraryPath": >>>>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >>>>> >>>>> Slot "properties": >>>>> EmbeddedInR >>>>> "true" >>>>> InterfaceManagerClass >>>>> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" >>>>> ForeignReferenceBaseClass >>>>> "org/omegahat/R/Java/RJavaInstance" >>>>> java.compiler >>>>> "NONE" >>>>> OMEGA_HOME >>>>> "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" >>>>> OmegahatSearchPath >>>>> ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Envi ronment.jar" >>>> >>>> My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded >>> >>> Mine is not expanded. I tried expanding it, but that didn't seem to make a difference either. :-( >>> >>> >>> -- >>> Seth Falcon >>> Bioconductor Core Team | FHCRC >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > > -- > Seth Falcon | @sfalcon | http://userprimary.net/user
ADD REPLY
0
Entering edit mode
Hi, On Fri, Jan 22, 2010 at 6:02 AM, Michael Dondrup <michael.dondrup at="" uni.no=""> wrote: > Dear Seth and Martin, > > this is great news. Thank you very much for this effort. I tried it and it works without problem in R started in ?a terminal. > > If I use the R-GUI however, I get: > [R.app GUI 1.31 (5537) i386-apple-darwin9.8.0] > >> library(SJava) > Error: package 'SJava' is not installed for 'arch=i386' > That's where it doesnt work: <snip> > Looks like another architecture dependent issue, as if this code is only installed for the 64bit version of R. > > Anyway, it is really great that it's working, so I can try advance to use RWebServices :) > > Whenever I can test something, pls let me know. 1. How did you install it? I think there are probably some flags you can set to have it compile both 64 and 32 bit versions (but I'm kind of surprised that this didn't happen automatically ... 2. Why not just use the 64bit version of the R GUI as well? You can download it here: http://r.research.att.com/#GUI Download the version that that ends in *Leapard64.dmg that's also the right version of R that you're using, eg: http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg Doing #2 is kind of side stepping the issue, but I think you'd probably like to run R/64bit even when running from the GUI as well. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
Hi, yes I was a bit puzzled, but now I got it working in R, R GUI and R64 GUI. Maybe there is still a glitch because you have to install three times for each binary but.... See below: Best Michael Am Jan 22, 2010 um 4:34 PM schrieb Steve Lianoglou: > Hi, > > On Fri, Jan 22, 2010 at 6:02 AM, Michael Dondrup <michael.dondrup at="" uni.no=""> wrote: >> Dear Seth and Martin, >> >> this is great news. Thank you very much for this effort. I tried it and it works without problem in R started in a terminal. >> >> If I use the R-GUI however, I get: >> [R.app GUI 1.31 (5537) i386-apple-darwin9.8.0] >> >>> library(SJava) >> Error: package 'SJava' is not installed for 'arch=i386' >> That's where it doesnt work: > <snip> > >> Looks like another architecture dependent issue, as if this code is only installed for the 64bit version of R. >> >> Anyway, it is really great that it's working, so I can try advance to use RWebServices :) >> >> Whenever I can test something, pls let me know. > > 1. How did you install it? I think there are probably some flags you > can set to have it compile both 64 and 32 bit versions (but I'm kind > of surprised that this didn't happen automatically ... > Yes, I have never seen this with any other package, I installed from the commandline: sudo R CMD INSTALL --clean SJava after that it works with /usr/bin/R but in the GUI I get: [R.app GUI 1.31 (5537) i386-apple-darwin9.8.0] > library(SJava) Error: package 'SJava' is not installed for 'arch=i386' And more striking in the R64 GUI I got: [R.app GUI 1.31 (5537) x86_64-apple-darwin9.8.0] > library(SJava) Error: package 'SJava' is not installed for 'arch=x86_64' So I installed the package using both /Applications/R and R64 Therefore I built a package with "R CMD build SJava" and installed it as a local package for the actual user (not gloabally). > 2. Why not just use the 64bit version of the R GUI as well? You can > download it here: > > http://r.research.att.com/#GUI I downloaded the R-2.10.1.pkg from cran, that also contained the R64, but I never used it because I use mainly the console. > > Download the version that that ends in *Leapard64.dmg that's also the > right version of R that you're using, eg: > > http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg > > Doing #2 is kind of side stepping the issue, but I think you'd > probably like to run R/64bit even when running from the GUI as well. > > -steve > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
Am Jan 19, 2010 um 5:58 PM schrieb Martin Morgan: > Michael Dondrup wrote: >> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >> >>> Michael Dondrup wrote: >>>> Hi, >>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>> maybe not supported, but i hope it can be made working anyway. >>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>> >>>>> library(SJava) >>>> Load the Java VM with .JavaInit() >>>>> .JavaInit() >>>>> example(.Java) >>>> .Java> v <- .JavaConstructor("java.util.Vector", as.integer(10)) >>>> >>>> .Java> .Java(v, "add", "A string element") >>>> Error in .Java(v, "add", "A string element") : >>>> Can't find org.omegahat.R.Java.RForeignReference > > this is in org.omegahat/Jars/RJava.jar, e.g., > > jar tf org.omegahat/Jars/RJava.jar > > more below... Thank you for this information, this seems to be the crucial point, because my install is lacking this file! I have only these: Seneca:SJava mdondrup$ find . -name "*.jar" ./org/omegahat/Jars/antlr.jar ./org/omegahat/Jars/Environment.jar ./org/omegahat/Jars/jas.jar ./org/omegahat/Jars/jhall.jar ./org/omegahat/Jars/ROmegahatExamples.jar I wonder what went wrong, as there was no error message during build. I have to further investigate the sources I think. Do you know at which point during install the jar's are being built? While the other jar's are already contained in the package, RJava.jar could be built from the files in inst/org/omegahat/R/Java ,correct? Thanks again > >>> Hi Michael -- >>> >>> .JavaInit has an argument default=javaConfig() which sets the class path >>> and other variables. My guess is that javaConfig() needs to be augmented >>> to return the correct class path. On my system it is >>> >>>> javaConfig()@classPath >>> [1] "<...>/library/SJava/org/omegahat/Jars/Environment.jar" >>> [2] "<...>/library/SJava/org/.." >>> [3] "<...>/library/SJava/org/omegahat/Jars/antlr.jar" >>> [4] "<...>/library/SJava/org/omegahat/Jars/jas.jar" >>> [5] "<...>/library/SJava/org/omegahat/Jars/jhall.jar" >>> >>> where <...> is the path to my R installation. >>> >>> Martin >> >> Hi Martin, >> thank you very much for your reply. My configuration looks pretty much like yours. All jars exist and readable. >> I tried messing around >> with the paths in addition, adding "/Library/Frameworks/R.framework/Resources/library/SJava/org/" (without the ..), to no avail. >> Are you using a Mac? It would be good to compare the full output of javaConfig() for a functioning version, >> maybe you could send that to me? >> And might be good to know in which jar the class org.omegahat.R.Java.RForeignReference is contained. >> >> >> If that is relevant: >> >> java version "1.6.0_17" >> Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) >> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) >> >> >> Here is the output of javaConfig(). >> >>> javaConfig() >> An object of class "JavaConfiguration" >> Slot "classPath": >> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/Environment.jar" >> [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." >> [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/antlr.jar" >> [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/jas.jar" >> [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/om egahat/Jars/jhall.jar" >> >> Slot "libraryPath": >> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >> >> Slot "properties": >> EmbeddedInR >> "true" >> InterfaceManagerClass >> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" >> ForeignReferenceBaseClass >> "org/omegahat/R/Java/RJavaInstance" >> java.compiler >> "NONE" >> OMEGA_HOME >> "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" >> OmegahatSearchPath >> ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Environ ment.jar" > > My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded > > Slot "properties": > > > EmbeddedInR > > > "true" > > > InterfaceManagerClass > > > "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" > > > ForeignReferenceBaseClass > > > "org/omegahat/R/Java/RJavaInstance" > > > java.compiler > > > "NONE" > > > OMEGA_HOME > > > "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat" > > > OmegahatSearchPath > ".,/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat/Env ironment/Scripts/Run,/home/mtmorgan/arch/x86_64/R-devel/library/SJava/ org/omegahat/Jars/Environment.jar" > > > java.library.path > > > "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/libs" > > >> java.library.path >> "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >> >> Slot "options": >> character(0) >> >> Slot "args": >> character(0) >> >> >> >> >> >> >> >> >> >> >>>> During installation I got the following error message, which I suspect to be relevant: >>>> >>>> ... >>>> ** R >>>> ** inst >>>> cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs >>>> sh: /usr/bin/tarxf: No such file or directory >>>> .... >>>> >>>> I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything. >>>> I put the full output of javareconf, R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. >>>> >>>> Michael >>>> >>>> [snip] >>>> >>>> >>>> >>>>> sessionInfo() >>>> R version 2.10.1 (2009-12-14) >>>> x86_64-apple-darwin9.8.0 >>>> >>>> locale: >>>> [1] C >>>> >>>> attached base packages: >>>> [1] stats graphics grDevices utils datasets methods base >>>> >>>> other attached packages: >>>> [1] SJava_0.72.0 >>>> >>>> loaded via a namespace (and not attached): >>>> [1] tools_2.10.1 >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at stat.math.ethz.ch >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >>> -- >>> Martin Morgan >>> Computational Biology / Fred Hutchinson Cancer Research Center >>> 1100 Fairview Ave. N. >>> PO Box 19024 Seattle, WA 98109 >>> >>> Location: Arnold Building M1 B861 >>> Phone: (206) 667-2793 >> > > > -- > Martin Morgan > Computational Biology / Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. > PO Box 19024 Seattle, WA 98109 > > Location: Arnold Building M1 B861 > Phone: (206) 667-2793
ADD REPLY
0
Entering edit mode
Michael Dondrup wrote: > > Am Jan 19, 2010 um 5:58 PM schrieb Martin Morgan: > >> Michael Dondrup wrote: >>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan: >>> >>>> Michael Dondrup wrote: >>>>> Hi, >>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's >>>>> maybe not supported, but i hope it can be made working anyway. >>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following: >>>>> >>>>>> library(SJava) >>>>> Load the Java VM with .JavaInit() >>>>>> .JavaInit() >>>>>> example(.Java) >>>>> .Java> v <- .JavaConstructor("java.util.Vector", as.integer(10)) >>>>> >>>>> .Java> .Java(v, "add", "A string element") >>>>> Error in .Java(v, "add", "A string element") : >>>>> Can't find org.omegahat.R.Java.RForeignReference >> this is in org.omegahat/Jars/RJava.jar, e.g., >> >> jar tf org.omegahat/Jars/RJava.jar >> >> more below... > > Thank you for this information, this seems to be the crucial point, because my install is lacking this file! > > I have only these: > > Seneca:SJava mdondrup$ find . -name "*.jar" > ./org/omegahat/Jars/antlr.jar > ./org/omegahat/Jars/Environment.jar > ./org/omegahat/Jars/jas.jar > ./org/omegahat/Jars/jhall.jar > ./org/omegahat/Jars/ROmegahatExamples.jar > > I wonder what went wrong, as there was no error message during build. I have to further investigate the sources I think. > Do you know at which point during install the jar's are being built? While the other jar's are already contained in the package, > RJava.jar could be built from the files in inst/org/omegahat/R/Java ,correct? as it turns out, RJava.jar seems to be something I created after installation -- there is no RJava.jar in a clean installation. The RForeignReference.class is in org/omegahat/R/Java, so I'm still wondering about the expansion of OMEGA_HOME mentioned below. Martin > > Thanks again > > > > >>>> Hi Michael -- >>>> >>>> .JavaInit has an argument default=javaConfig() which sets the class path >>>> and other variables. My guess is that javaConfig() needs to be augmented >>>> to return the correct class path. On my system it is >>>> >>>>> javaConfig()@classPath >>>> [1] "<...>/library/SJava/org/omegahat/Jars/Environment.jar" >>>> [2] "<...>/library/SJava/org/.." >>>> [3] "<...>/library/SJava/org/omegahat/Jars/antlr.jar" >>>> [4] "<...>/library/SJava/org/omegahat/Jars/jas.jar" >>>> [5] "<...>/library/SJava/org/omegahat/Jars/jhall.jar" >>>> >>>> where <...> is the path to my R installation. >>>> >>>> Martin >>> Hi Martin, >>> thank you very much for your reply. My configuration looks pretty much like yours. All jars exist and readable. >>> I tried messing around >>> with the paths in addition, adding "/Library/Frameworks/R.framework/Resources/library/SJava/org/" (without the ..), to no avail. >>> Are you using a Mac? It would be good to compare the full output of javaConfig() for a functioning version, >>> maybe you could send that to me? >>> And might be good to know in which jar the class org.omegahat.R.Java.RForeignReference is contained. >>> >>> >>> If that is relevant: >>> >>> java version "1.6.0_17" >>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) >>> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) >>> >>> >>> Here is the output of javaConfig(). >>> >>>> javaConfig() >>> An object of class "JavaConfiguration" >>> Slot "classPath": >>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/Environment.jar" >>> [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.." >>> [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/antlr.jar" >>> [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/jas.jar" >>> [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/o megahat/Jars/jhall.jar" >>> >>> Slot "libraryPath": >>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >>> >>> Slot "properties": >>> EmbeddedInR >>> "true" >>> InterfaceManagerClass >>> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" >>> ForeignReferenceBaseClass >>> "org/omegahat/R/Java/RJavaInstance" >>> java.compiler >>> "NONE" >>> OMEGA_HOME >>> "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" >>> OmegahatSearchPath >>> ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Enviro nment.jar" >> My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded >> >> Slot "properties": >> >> >> EmbeddedInR >> >> >> "true" >> >> >> InterfaceManagerClass >> >> >> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" >> >> >> ForeignReferenceBaseClass >> >> >> "org/omegahat/R/Java/RJavaInstance" >> >> >> java.compiler >> >> >> "NONE" >> >> >> OMEGA_HOME >> >> >> "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat" >> >> >> OmegahatSearchPath >> ".,/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat/En vironment/Scripts/Run,/home/mtmorgan/arch/x86_64/R-devel/library/SJava /org/omegahat/Jars/Environment.jar" >> >> >> java.library.path >> >> >> "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/libs" >> >> >>> java.library.path >>> "/Library/Frameworks/R.framework/Resources/library/SJava/libs" >>> >>> Slot "options": >>> character(0) >>> >>> Slot "args": >>> character(0) >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>>> During installation I got the following error message, which I suspect to be relevant: >>>>> >>>>> ... >>>>> ** R >>>>> ** inst >>>>> cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non- directory inst/libs >>>>> sh: /usr/bin/tarxf: No such file or directory >>>>> .... >>>>> >>>>> I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything. >>>>> I put the full output of javareconf, R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. >>>>> >>>>> Michael >>>>> > >>>>> [snip] > >>>>> >>>>> >>>>>> sessionInfo() >>>>> R version 2.10.1 (2009-12-14) >>>>> x86_64-apple-darwin9.8.0 >>>>> >>>>> locale: >>>>> [1] C >>>>> >>>>> attached base packages: >>>>> [1] stats graphics grDevices utils datasets methods base >>>>> >>>>> other attached packages: >>>>> [1] SJava_0.72.0 >>>>> >>>>> loaded via a namespace (and not attached): >>>>> [1] tools_2.10.1 >>>>> >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at stat.math.ethz.ch >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >>>> -- >>>> Martin Morgan >>>> Computational Biology / Fred Hutchinson Cancer Research Center >>>> 1100 Fairview Ave. N. >>>> PO Box 19024 Seattle, WA 98109 >>>> >>>> Location: Arnold Building M1 B861 >>>> Phone: (206) 667-2793 >> >> -- >> Martin Morgan >> Computational Biology / Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N. >> PO Box 19024 Seattle, WA 98109 >> >> Location: Arnold Building M1 B861 >> Phone: (206) 667-2793 > -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD REPLY

Login before adding your answer.

Traffic: 539 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6