Setup R and Java application on OSX 10.7.2

半腔热情 提交于 2019-12-11 05:27:38

问题


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:


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)



来源:https://stackoverflow.com/questions/8977723/setup-r-and-java-application-on-osx-10-7-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!