Open dhchenx opened 2 years ago
Regarding issue 2, the start_model.bat assumes that the java runtime executable is set in the user's path. Some Java installers like the one distributed by Oracle will set this automatically when the user installs the JRE. Other JRE distributions may not set the java path on the user's machine, so this path would need to either be set manually, or the start_model.bat file needs to updated to point to the location of the javaw.exe.
We should at least include documentation that the user may need to configure their machine's javaw executable path. I'm not sure if we can create general functions in the model launcher scripts for win and osx to find java if it's missing from the path.
We should at least include documentation that the user may need to configure their machine's javaw executable path. I'm not sure if we can create general functions in the model launcher scripts for win and osx to find java if it's missing from the path.
I tried to use java command instead of javaw to run the START command generated in the start_model.bat
file so as to get the precise error output, and it produced the following error:
My command (supposing my ReNetLogo project is called test1 :
START java -XX:+IgnoreUnrecognizedVMOptions --add-modules=ALL-SYSTEM --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED -cp ";../repast.simphony/repast.simphony.runtime_2.9.1/bin;../repast.simphony/repast.simphony.runtime_2.9.1/lib/*;../groovylib/groovy-3.0.9-indy.jar;lib/*;../repast.simphony/repast.simphony.runtime_2.9.1/bin;../repast.simphony/repast.simphony.runtime_2.9.1/lib/*;../groovylib/groovy-3.0.9-indy.jar;lib/*;../repast.simphony/repast.simphony.runtime_2.9.1/bin;../repast.simphony/repast.simphony.runtime_2.9.1/lib/*;../groovylib/groovy-3.0.9-indy.jar;lib/*;../repast.simphony/repast.simphony.runtime_2.9.1/bin;../repast.simphony/repast.simphony.runtime_2.9.1/lib/*;../groovylib/groovy-3.0.9-indy.jar;lib/*;../repast.simphony/repast.simphony.runtime_2.9.1/bin;../repast.simphony/repast.simphony.runtime_2.9.1/lib/*;../groovylib/groovy-3.0.9-indy.jar;lib/*" repast.simphony.runtime.RepastMain "./test1.rs"
The error output:
ERROR [main] 00:18:42,740 Boot - null
java.lang.NullPointerException: null
at saf.core.runtime.Boot.init(Boot.java:79) ~[saf.core.runtime.jar:?]
at saf.core.runtime.Boot.main(Boot.java:247) ~[saf.core.runtime.jar:?]
at repast.simphony.runtime.RepastMain.main(RepastMain.java:43) ~[bin/:?]
ERROR [main] 00:18:42,749 Boot - null
java.lang.NullPointerException: null
at saf.core.runtime.Boot.run(Boot.java:101) ~[saf.core.runtime.jar:?]
at saf.core.runtime.Boot.main(Boot.java:248) ~[saf.core.runtime.jar:?]
at repast.simphony.runtime.RepastMain.main(RepastMain.java:43) ~[bin/:?]
It seems such a problem exists when different versions of JREs are used after I googled the problem. By the way, I am using jdk-11.0.10 in my computer.
Any solutions?
I've usually seen the above error when there is a problem with the path to the .rs scenario folder, and the error is because the Repast runtime can't parse the scenario folder path. Does the model path happen to include any special characters or non-Latin characters?
I've usually seen the above error when there is a problem with the path to the .rs scenario folder, and the error is because the Repast runtime can't parse the scenario folder path. Does the model path happen to include any special characters or non-Latin characters?
I moved the model
folder to the root of D:/
and rerun the start_model.bat
. Indeed, my previous file path contains non-Latin characters. Finally, it works. So the Issue 2 is solved! Thanks!
Hi,
Thanks for your hard work in Repast. I like the feature of model distribution in a single jar file and the portable archive file. However, the existing functions of deploying the model have significant issues.
My environment: Windows 10 Pro, JDK 11.
Issue 1: When I build the installer for my ReLogo project and we then have a setup.jar file. However, I failed to install the built installer (setup.jar) and struck in the step of installing. The ReLogo Getting Started doc says the LzPack only supports Java version 7 or 8, not later. That is quite annoying since at present most of our computers have installed the latest version of JDK. Maybe in the future, the IzPack should be replaced by a more modern installer library.
Issue 2: Then I tried to build a portable archive file to distribute my model. However, I run the "start_model.bat" and failed to run the model. I assume the problem is the same as the previous one due to different versions of JDK.
Again, since Repast is an amazing simulation toolkit, please consider replacing the IzPack that could hinder the wide distribution of user's Repast models.