Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7578347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:24:38+00:00 2026-05-30T17:24:38+00:00

I want to call some R code from within Java, on a Linux machine

  • 0

I want to call some R code from within Java, on a Linux machine that has R installed already, so the Java/R Interface (JRI) is needed.

However, I am not sure how to go about this.

The JRI homepage says that the package is bundled in rJava. So, I downloaded rJava-0.9.3.tar.gz from the rJava Files section, and unzipped it, getting (among other things) a lot of Java source files (and their corresponding classes) in the src/java folder, plus 2 JARs (JRIEngine.jar and REngine.jar) in the inst/jri folder.

The JRI Files section, though, in addition to the above 2 JARs, also includes JRI.jar and all three of these libraries are more recent than the 2 in inst/jri.

In addition, none of these 3 JARs includes the binaries for the classes found in src/java, which appear to be necessary for calling R from within Java.

Running “make all” in the java/src folder seems to just execute some tests and no JAR is produced.

I would expect that all necessary classes come bundled in JAR files, so that they could be easily added in the classpath and in IDE projects (e.g., in Eclipse).

How can I get to that point?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:24:39+00:00Added an answer on May 30, 2026 at 5:24 pm

    Use install.packages("rJava") in R – that will install rJava which includes JRI. You’ll get the same effect by using R CMD INSTALL rJava_0.9-3.tar.gz. Both are the documented ways to install R packages. Make sure you have JDK installed and configured R with Java support before. Once installed, you can ask R about the location of JRI with system.file("jri",package="rJava")

    Note that in order to use JRI you will need to setup the environment properly (typically using R CMD) and set java.library.path to include the JRI location. You may want to scan the stats-rosuda-devel mailing list which is the canonical place to ask about rJava/JRI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to call some RESTful web services from a J2ME client running on
I want to have an executable file that will call some other programs. The
I want to call an ASHX file and pass some query string variables from
I want to create some kind of AJAX script or call that continuously will
I want to be able to get some output from mysql stored procedure within
I've got some Ajax code with calls a WebMethod from within my back-end code
This page shows how to call C++ functions from within QML. What I want
I have a .net web service that takes some xml data. From within the
I want to call a url with passing some parameter and i want to
I want to be able to make an HTTP call updating some select boxes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.