Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java woes... #1

Open
cvisintin opened this issue Jun 27, 2019 · 8 comments
Open

Java woes... #1

cvisintin opened this issue Jun 27, 2019 · 8 comments

Comments

@cvisintin
Copy link
Contributor

openjdk-8-jdk \

This is installing multiple versions of JRE - 8 & 11. We need to force only the single version to install or somehow set the version to use to 8

@cvisintin
Copy link
Contributor Author

We could try adding:
alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre

I don't think setting of JAVA_HOME is persisting through into the container

@jdyen
Copy link
Contributor

jdyen commented Jun 28, 2019

This can be solved within an R session by updating the LD_LIBRARY_PATH with Sys.setenv(). This seems less than ideal, but I assume there's a way to add java-8 to the path more generally without breaking anything?

@cvisintin
Copy link
Contributor Author

Can the LD_LIBRARY_PATH be set outside of a session? I think that is where we are running into trouble...

@jdyen
Copy link
Contributor

jdyen commented Jun 28, 2019

It probably can be set globally but possibly shouldn't. Beyond me at this stage, but I'll do some googling.

@goldingn
Copy link
Member

goldingn commented Jul 1, 2019

I would try setting LD_LIBRARY_PATH a .Rprofile file in the user's R home directory. The following R code will do that (R's R.home() function is needed to find the appropriate directory).

rprofile <- file.path(R.home(), ".Rprofile")
file.create(rprofile)
cat('Sys.setenv(LD_LIBRARY_PATH = <blahblahblah>)', file = rprofile)

Maybe it's worth wrapping this and other R things like #3 up in an R setup script to run in the dockerfile?

@goldingn
Copy link
Member

goldingn commented Jul 1, 2019

I this this Rprofile approach means the environment variable is only set for R, not for other programs that might want to use java

@jdyen
Copy link
Contributor

jdyen commented Jul 1, 2019

I've tried some variants of this, setting LD_LIBRARY_PATH and JAVA_HOME. It seems to break the rJava installation then, so it won't even install RNetLogo.

@jdyen
Copy link
Contributor

jdyen commented Jul 2, 2019

I'm not sure this is the best route to go down. Why do we need Java 8? I suggest focusing on the NetLogo issue because everything else works: #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants