Skip to content

R 2.15.2, OS X 10.8.2, JGR

9 messages · Mike Parker, Peter Dalgaard, Marc Schwartz +2 more

#
Hi All:

I recently upgraded my computer to 10.8.2, and my Java is now java 1.7 from Oracle.  I am running R 2.15.2, and now rjava and JGR don't work because what appears to be a problem with ipot.  I tried reinstalling rjava and got the following:
Then if I load JGR I get:
I tried building iplots from source, but that failed with basically the same error.  I assume iplots is looking for java 1.6.  Any ideas?

Thanks,

-Roy M.

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
#
I think today went well. Everyone ate and drank a lot less than they might have done. I bought plenty of everything to make sure that there was enough. I also bought food for tea in case they stayed but they didn't
On 28 Dec 2012, at 19:40, Roy Mendelssohn - NOAA Federal wrote:

            
#
On Dec 28, 2012, at 20:40 , Roy Mendelssohn - NOAA Federal wrote:

            
I can't remember this kind of stuff form one occasion to the next either, but wouldn't it be something with "sudo R CMD javareconf" ?
#
On Dec 28, 2012, at 3:05 PM, peter dalgaard <pdalgd at gmail.com> wrote:

            
For Mountain Lion, it should be:

  sudo R CMD javareconf JAVA_CPPFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers

Regards,

Marc Schwartz
#
Thanks.  But I am still stuck.  No matter which command I give, I  get the following:
Note the Java home path.  But when I  do the following:
So where is ti getting that the home path is to /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home?  Is there a file that I can hand edit to give R the correct values?

Thanks.

-Roy M.
On Dec 28, 2012, at 1:28 PM, Marc Schwartz <marc_schwartz at me.com> wro
**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
#
Roy,

Did you install the 1.7 JRE only, or did you also install the JDK?  

If you did not also install the JDK, I believe that you need to do so. It is available here:

  http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Install that and then run the full javareconf command as I had in my reply below.

Regards,

Marc
On Dec 28, 2012, at 6:11 PM, Roy Mendelssohn - NOAA Federal <roy.mendelssohn at noaa.gov> wrote:

            
#
Yes i have the jdk.  But I just stumbled on part of the problem (I have a feeling i know have to wrestle with 32-bit versus 64-bit versions).

I accidently gave the command:
without the sudo and the paths were being set correctly to the java 1.7 machine, but of course without permissions it would not overwrite the settings.  I then instead did:
That then echoed what I expected.  Okay, so my question is I have been running R not R64.  To use rJava, JGR  etc do I need to run R64 and just install the binary or build from source?  because even though now my paths are set correctly, iplots is still unhappy, and won't build either, because the compiler is trying to do 64-bits in a 32-bit program.

Thanks for any help.

-Roy
On Dec 28, 2012, at 4:35 PM, Marc Schwartz <marc_schwartz at me.com> wrote:

            
**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
#
On Dec 28, 2012, at 7:46 PM, Roy Mendelssohn - NOAA Federal wrote:

            
"of course"? R is normally (i.e. from CRAN) installed so that admin users can modify settings. It will only fail if you messed with sudo before or you are not an admin user.
You have to build rJava from sources with R64 because Oracle's Java is incompatible with anything Apple has supplied before -- see the Oracle 1.7 thread on stats-rosuda-devel (which is the mailing list for rJava and JGR). Oracle's Java doesn't support 32-bit anyway, so you have to use 64-bit R.
There is no compiler involved in iplots and there is no reason to mess with it (you were mistaken, iplots merely starts rJava which is where you get the JVM error - it has nothing to do with iplots, really) - there is no native code in there and it works with any Java, so just use the CRAN binary. The only piece you have to re-compile is rJava (and possibly JavaGD), everything else should work from CRAN. Just make sure you're using the 64-bit JGR launcher.

Cheers,
Simon
#
Thanks!.  I am an admin user, using javareconf with sudo overwrote the settings, just didn't find the java 1.7 settings.  I had to su so that I could explicitly set JAVA_HOME and overwrite the settings,  even though JAVA_HOME is set in my bash_profile.  I mainly wrote that down for the record, in case anyone else runs into the problem.

rJava is one piece I did not try rebuilding.   I will give that a go.

It is a shame that the Apple Java utility no longer exists, so that it is relatively easy to switch between Javas.      My memory also is that you use to set JAVA_HOME to a location in the javavm.frameworks directory, but clearly not anymore.  

Thanks again and happy new year.

-Roy
On Dec 28, 2012, at 7:51 PM, Simon Urbanek <simon.urbanek at r-project.org> wrote:

            
**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.