在OSX 10.7.2上安装R和Java应用程序 [英] Setup R and Java application on OSX 10.7.2

查看:233
本文介绍了在OSX 10.7.2上安装R和Java应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在使用R和Java的Windows上运行应用程序,而我正尝试迁移到Unix系统上.

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.

我在论坛和Google上进行了搜索,找不到在环境变量设置中明确的内容. 该应用程序使用Java,Tomcat和R. (在Windows上,我们通常会安装JGR,因此R可以在Java中运行,但是在MAC rJava上似乎是使此工作正常的方法)

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)

因此,我安装了Java版本"1.6.0_29",R版本2.14.1,rJava 0.9-3和tomcat 7.0.20.我需要让该应用程序在tomcat上运行以进行测试.

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. 设置JAVA_HOME变量
  2. 设置CATALINA_HOME变量
  3. 设置接收环境.变数 (我不确定这些文件是否应该放在.profile,.bash_profile等文件中.)
  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.)

我正在Mac OSX 10.7.2上运行

I'm running on Mac OSX 10.7.2

任何帮助将不胜感激.谢谢.

Any help would be appreciated. Thanks.

推荐答案

您实际上不需要设置任何内容-只需使用

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

install.packages("rJava")

与Windows上的完全相同.就是全部(如果需要,可以通过从JGR站点下载JGR来使用JGR,但这与Windows上的JGR相同-您不需要JGR在两种操作系统中都可以运行Java-JGR只是一个碰巧使用Java和Java的GUI从而自动安装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)

这篇关于在OSX 10.7.2上安装R和Java应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆