Setup R and Java application on OSX 10.7.2

2019-08-13 03:20发布

We've been running an application on windows where we use R and Java and I'm trying to migrate over to a Unix system.

I've searched through the forums and Google and can't find anything that is clear on the environment variable setup. The application uses Java, Tomcat, and R. (On windows we usually install JGR so R can run in java, but it seems on MAC rJava is the way to get this working)

So I've got java version "1.6.0_29", R version 2.14.1, rJava 0.9-3, and tomcat 7.0.20 installed. I need to get the application running on tomcat for testing.

Here is what I think I need to do that I can't find good documentation on:

  1. Set the JAVA_HOME variable
  2. Set the CATALINA_HOME variable
  3. Set the R env. variables (I'm not sure if these should go in .profile, .bash_profile, etc.)

I'm running on Mac OSX 10.7.2

Any help would be appreciated. Thanks.

1条回答
Animai°情兽
2楼-- · 2019-08-13 03:56

You don't really need to set anything - simply use

install.packages("rJava")

which is exactly the same as on Windows. That's all (you can use JGR if you want by downloading it from the JGR site, but it's the same as on Windows - you don't need JGR to run Java in neither OS - JGR is simply a GUI that happens to use Java and thus installs rJava automatically)

查看更多
登录 后发表回答