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

Failed running IzPack setup.jar and portable archive #71

Open
dhchenx opened this issue Aug 3, 2022 · 5 comments
Open

Failed running IzPack setup.jar and portable archive #71

dhchenx opened this issue Aug 3, 2022 · 5 comments
Assignees
Milestone

Comments

@dhchenx
Copy link

dhchenx commented Aug 3, 2022

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.

@etatara
Copy link
Member

etatara commented Aug 3, 2022

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.

@etatara etatara self-assigned this Aug 3, 2022
@etatara
Copy link
Member

etatara commented Aug 3, 2022

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.

@etatara etatara added this to the v.3.0.0 milestone Aug 3, 2022
@dhchenx
Copy link
Author

dhchenx commented Aug 3, 2022

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?

@etatara
Copy link
Member

etatara commented Aug 3, 2022

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?

@dhchenx
Copy link
Author

dhchenx commented Aug 3, 2022

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!

@etatara etatara modified the milestones: v.3.0.0, v.2.11.0 Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants