Git Product home page Git Product logo

Comments (3)

s-u avatar s-u commented on August 28, 2024

The error typically means that your R is not configured properly for your JVM location. Since you are using 3rd party distribution of R, please contact Microsoft for support.

In regular R you would use R CMD javareconf to make sure R is configured for your Java. In technical terms, R records the location of Java in $R_HOME/etc/ldpaths so if your R is configured properly you will see Java included in LD_LIBRARY_PATH, e.g.:

> Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/R/devel/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-11-openjdk-amd64/lib/server"

The path containing libjvm.so must be listed there. If you don't see your JDK there then your R is not properly configured.

from rjava.

isaac2lord avatar isaac2lord commented on August 28, 2024

Thanks for replying.

I have already run R CMD javareconf before installation, and I think it sets everything up appropriately.

Sys.getenv("LD_LIBRARY_PATH")
[1] "/opt/microsoft/ropen/4.0.2/lib64/R/lib:/lib:/builddir/vendor/build/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.41.x86_64/jre/lib/amd64/server"

I found this response in stackoverflow but not sure if it's relevant to this error or not? This seems to be an RStudio thing, but I get the same error when trying to load rJava at CLI.

from rjava.

isaac2lord avatar isaac2lord commented on August 28, 2024

I had to stop and start RStudio session after running that R CMD javareconf for things to get completely effective.

sudo systemctl stop rstudio-server
sudo systemctl start rstudio-server

Thanks for the hints @s-u

from rjava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.