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

JRE and other run-time requirements should be documented (and ideally be relaxed) #141

Closed
fallenguru opened this issue Oct 6, 2019 · 7 comments

Comments

@fallenguru
Copy link

JStock seems to be quite sensitive to the installed Java version and/or additional non-standard components. As in, if everything isn't just right, certain functionality will silently(!) fail.

  • [Ubuntu 18.04.3] openjdk-11-jre: doesn't load options, then overwrites them with defaults on exit; attempts to access the cloud sync feature hang.
  • [Ubuntu 18.04.3] openjdk-8-jre:amd64: doesn't load options, then overwrites them with defaults on exit; cloud sync window opens normally [not tested further], iff openjfx version 8 is also installed (incl. dependencies).
  • [Oracle] jre1.8.0_221: loads settings, cloud sync looks alright [not tested].

On Ubuntu 18.04.3, the package libcanberra-gtk-module is required to get rid of a (harmless) error message.

I don't mind the fact that JStock depends on specific pieces of software in particular versions being present, but I would like to know what they are; ideally to see error messages, when they aren't met. Currently the install help just says to "install Java". Regardless, things should never silently just not work.

I don't know if JStock can be updated to run on any modern Java implementation, but as long as there are more specific requirements, it'd be great if they could be explicitly stated.

@yccheok
Copy link
Owner

yccheok commented Nov 20, 2019

Sorry. I still have no idea why JStock yields different behavior in different Java vendor platform. I need to spend some time to figure out the real root cause. Thanks for reporting this.

@yccheok
Copy link
Owner

yccheok commented Nov 21, 2019

@fallenguru

I have fixed the problem, with instruction on how to install Java right here : https://jstock.org/help_install_upgrade.html#install-linux

Now, JStock should be able to run under openjdk 11. Can you kindly try it out with latest JStock release, and let us know the outcome? Thank you.

@fallenguru
Copy link
Author

I haven't done any extensive testing by any means, but jstock-1.0.7.41 launches and seems to run fine using Ubuntu 18.04.3's default-jre (currently openjdk-11-jre). Thank you!

On startup, I get a couple of warnings, but they seem to be benign:
Warning: /bin/java does not exist
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/home/chris/local/jstock-new/jstock/lib/xstream-1.4.11.1.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Security framework of XStream not initialized, XStream is probably vulnerable.
[... last one repeated a few times ...]

I have a few suggestions to further improve the documentation at https://jstock.org/help_install_upgrade.html#install-linux:

  • Currently the shell prompts in the instructions show up as "[email protected]" for me.
  • I'm not sure if that level of detail is even necessary, it should be enough to tell people that they need a JRE that supports JavaFX, at least Java version x, at most y, then give the Debian/Ubuntu pacakge names as an example. A list of supported (= what you test on) and known-to-work (= reported by users) Java implementations would make a good FAQ item (not specific to Linux).
  • The bit about "Warning: /bin/java does not exist" is possibly out-of-date or distribution specific. Here, java lives under /usr/bin/, so I get the warning even though it's installed and working.

@yccheok
Copy link
Owner

yccheok commented Nov 27, 2019

Thank you. I had revised accordingly - https://jstock.org/help_install_upgrade.html#install-linux

Does it look good to you now?

@fallenguru
Copy link
Author

Brilliant, thank you!

@ghost
Copy link

ghost commented Jun 5, 2023

I think this issue is still present.

I can run JStock with Java 11, but it does not actually work expected way. E.g. the prices in the table are all displayed as 0.

Reopen?

@yccheok
Copy link
Owner

yccheok commented Jun 6, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants