Skip to content
Prev 2541 / 15076 Next

Problems loading Java libraries in R 2.2.1 OS X 10.4.5, Java 1.5.0 rev 3

Simon Urbanek wrote:

            
That's exactly what I thought after my initial try to compile the
package did not work (except that it was not clear to me wether the
"CurrentJDK" link was the only place where things could go wrong).

So I did check my setup:

lrwxr-xr-x    1 root  wheel    3 Nov  8 10:47 CurrentJDK -> 1.5

which in turn points to 1.5.0, so this should be correct.
You are right here, the package does not check for the correct Java
automatically, but has to be forced to do it correctly. I managed to
compile it by unpacking the tar.gz and hand-editing

RMAGEML/src/Makevars (and Makevars.perm and Makevars.in) so that it
looks like this

# for macosx of 3/05
#
PKG_CPPFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers
PKG_LIBS=-framework JavaVM

after that it compiled (actually this code was in the Makevars script
allready and just had to be uncommented -a more clever Makevars should
fix this).

At least the PKG_CPPFLAGS points to

lrwxr-xr-x    1 root  wheel   24 Apr  5 14:56 Headers ->
Versions/Current/Headers

which should be ok (see above).

Will have a closer look at the CPPFLAGS and LIBS settings and try to
find out some more stuff about Java on Mac and try again.

P.S. Got mail from the original author, he mentions that no one tried to
compile it on Mac so far -might become interresting. :-)