问题
I want to start NetLogo from R and load a model.
When I start like so (gui = TRUE
):
NLStart(nl.path = "C:/Program Files/NetLogo 6.1.0/app", nl.jarname = "netlogo-6.1.0.jar", gui = TRUE)
and load the model I get
model:java.lang.reflect.InvocationTargetException
When I start like so (gui = FALSE
):
NLStart(nl.path = "C:/Program Files/NetLogo 6.1.0/app", nl.jarname = "netlogo-6.1.0.jar", gui = FALSE)
and load the model I get
Java-Object{java.lang.NoSuchMethodError: org.nlogo.workspace.Controllable.open(Ljava/lang/String;)V}
I use RNetLogo 1.0.4, rJava 0.9.11 and JAVA Version 8 Update 221 Release date July 16, 2019 with R 3.6.1 and NetLogo 6.1.0. Sys.getenv("R_ARCH") gives "/x64"
It works fine with NetLogo 6.0.4, so they obviously changed something yet again.
I guess there is no other chance than to stay with NetLogo 6.0.4 right?!? It is really unfortunate that RNetLogo is not maintained anymore...
Any ideas on how to fix this without going back to NetLogo 6.0.4? Your help is well appreciated!
来源:https://stackoverflow.com/questions/58057340/java-lang-nosuchmethoderror-when-loading-model-with-rnetlogo