- First you install R
- The you install JDK
- Then you install the Eclipse plugin for RJava (link is on http://www.studytrails.com/RJava-Eclipse-Plugin/)
- Then you install RJava. Here is how:
Open R. Choose the menu Packages -> Install package(s):
Choose the CRAN mirror:
Choose the RJava package:
library() in the RConsole to find the path to the library.
We’ll need that later in Eclipse Preferences.
Here is the path to the R library.
Of course, it will be different on your computer.
Remember this path:
On the library path, we find the RJava folder
In Eclipse -> Window -> Preferences -> RJava, we fill in the Path to JRI DLL Dir:
We fill in the Path To JRI JARS:
We fill in the Path To R Dll Dir.
This depends on the type of machine you have.
For a x32 machine, the R.dll is in the bin\i386 folder.
For a x64 machine, the R.dll is in bin\x64 folder.
We fill in the path to the jvm.dll dir.
This depends on where you have installed your JDK.
We run the test. You can copy a Java test file from the
Right-click the R_prj and choose Run configurations… -> rJava -> New…
The press Run.
You can type in
license() to see the R license: