dismo and Error in rJava::.jnew("meversion") : java.lang.ClassNotFoundException

1,927 views
Skip to first unread message

Eliecer E. Gutierrez

unread,
May 9, 2017, 12:38:16 AM5/9/17
to Maxent
Dear colleagues,

I am trying to use Maxent 3.4 through the dismo package (actually while using ENMeval), but I am getting the following error message:

Error in rJava::.jnew("meversion") : java.lang.ClassNotFoundException

I re-installing rjava and dismo, and I did place the maxent.jar file in the corresponding java folder within dismo, but the problem remains.

I also followed what is indicated in the following page, but the problem was not fixed: http://enmtools.blogspot.com.br/2017/04/solution-to-erroneous-please-update.html

The problem stared after I updated java in my mac a couple of days ago. 

Thank you in anticipation for any help to solve this issue,

Eliécer

Jamie M. Kass

unread,
May 9, 2017, 1:03:13 AM5/9/17
to Maxent
Can you load rJava with no problems? There are a few helpful strings on Stack Overflow about Java installations and rJava that have helped me before, but I cannot pull them up at the moment. Basically, if you cannot library(rJava) or run .jinit(), you have a Java problem. If all that stuff works, try running dismo::maxent(). If that works, then it's an ENMeval problem (which I doubt). It's likely a Java issue. Make sure you have the 64 bit installation if you are using a 64 bit machine.

Jamie

Eliécer E. Gutiérrez

unread,
May 9, 2017, 7:12:40 PM5/9/17
to Maxent
Hi Jamie,

The problemas was exactly that, that I was not able to load rJava. A colleague kindly pointed out to this website: https://github.com/snowflakedb/dplyr-snowflakedb/wiki/Configuring-R-rJava-RJDBC-on-Mac-OS-X   After I followed the steps indicated there, the problem was fixed. However, it seems that from now on every time that I will need to use rJava I will have to open Rstudio or R calling it from the terminal (as indicated in the web page whose link I pasted above).

As always, thank you so much for being willing to help! Best regards from Brasil,

Eliécer

Tristan Derham

unread,
Oct 9, 2019, 7:55:17 PM10/9/19
to Maxent
Hi Jamie, I'm getting the same error from running dismo::maxent() . Any suggestions?

Tristan Derham

unread,
Nov 23, 2019, 4:17:23 AM11/23/19
to Maxent
Hi all, I solved this problem by making sure the following files 

maxent.sh
readme.txt
maxent.bat
maxent.jar

were in the folder C:\\Users\...\Documents\R\win-library\3.6\dismo\java

Jamie M. Kass

unread,
Nov 23, 2019, 4:21:36 AM11/23/19
to max...@googlegroups.com
Tristan,

Sorry for not responding before. Yes, you need maxent.jar in the dismo/java folder to use maxent(). However, if you still have issues, it's likely a rJava package problem.

Jamie

--
You received this message because you are subscribed to a topic in the Google Groups "Maxent" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maxent/XwlpuXVPrKQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maxent+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maxent/dcf44da7-ce6f-44b5-9eb1-cc15ef3be80c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages