I tried to install a plugin for eclipse,but get an error,after some googling,got a suggestion to run :sudo R CMD javareconf,but got this error:
*** Cannot find any Java interpreter
*** Please make sure 'java' is on your PATH or set JAVA_HOME correspondingly
By the way,my $JAVA_HOME points to a oracle-jdk-7
Most likely, your root user doesn't have a JAVA_HOME set. Do you absolutely need to sudo
it?
If you do, you could use a small bash script to do it:
#!/bin/bash
export JAVA_HOME="<path to jdk>"
R CMD javareconf
Save the file and give it a name like myinstall
or something like that, perform a chmod +x myinstall
and sudo ./myinstall
EDIT
@Mat pointed out a good point. I changed my approach. Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With