0

I am trying to run the maxent function in the dismo package on macOS through rJava and keep getting this error message.

Error in rJava::.jcall(mxe, "S", "fit", c("autorun", "-e", afn, "-o", : java.awt.HeadlessException

Has anyone seen it before and know how to fix it? Thank you so much!

1 Answers1

0

I am working as a dev for EcoCommons (https://app.ecocommons.org.au)

I was having this issue with building out our coding cloud, which is a jupyterhub k8s deployment (https://analysis-tools.app.ecocommons.org.au/coding-cloud). We are using Rstudio Server, but I would imagine the issue is similar perhaps.

RStudio sets the DISPLAY env variable. What you will need to do is unset this high up in your script.

sys.unsetenv('DISPLAY')

Gary Burgmann
  • 193
  • 2
  • 5