yccheok / jstock

JStock is a free stock market software for 28 countries.
https://jstock.org
663 stars 347 forks source link

options aren't loaded (on Ubuntu 18.04.3) #139

Closed fallenguru closed 5 years ago

fallenguru commented 5 years ago

jstock 1.0.7.39 on Ubuntu 18.04.3, openjdk-11-jre and matching openjfx (also tried v8, no difference).

Options, from the most recently active tab on the main window to anything in Options-Options will not load on startup (but default values used instead). These default values will then be saved on program exit, overwriting the initially correctly saved values. The actual data (watchlists, buys, sells, ...) is fine.

Steps to reproduce: 1) Copy the .jstock from a working & configured (Windows) installation to ~/.jstock. 2) Run jstock. 3) Observe that everything has reset to default.

Alternative steps to reproduce: 1) Remove ~/.jstock. 2) Run jstock. (~/.jstock is created & populated.) 3) Enable Options-Options-Broker fee, add a new broker, name "testbroker". 4) Quit jstock. (Observe that ~/.jstock/1.0.7/config/options.xml now contains testbroker.) 5) Run jstock again, open Options window, see that Broker fee is unchecked again, and no brokers listed. 6) Quit jstock. (Observe that ~/.jstock/1.0.7/config/options.xml no longer has "testbroker".)

fallenguru commented 5 years ago

Tried with the proprietary Oracle jre (jre1.8.0_221), that works. I'd rather use the jre provided by the OS vendor, though, so I'd like to get to the bottom of this.

How can I enable logging? I tried editing config/commons-logging.properties, even removing it entirely, but I don't get anything on stderr (regardless of the java version used).

yccheok commented 5 years ago

@fallenguru

Thanks for reporting this. Currently, I'm not able to reproducing this problem due to lack of access to Linux machine. I will try to find out a way to get a Linux machine first...

fallenguru commented 5 years ago

FWIW, I find that VirtualBox is a quick way to get a Linux environment, or even multiple different ones, running on a Windows host.

yccheok commented 5 years ago

Yes. Thank you. I think I found the root cause of not able to restore config. But, I still need time to resolve cloud feature in openjdk. As, cloud feature is using javafx. Openjdk seems to have poor support in javafx.

fallenguru notifications@github.com 於 2019年11月21日 週四 上午12:40 寫道:

FWIW, I find that VirtualBox https://www.virtualbox.org/ is a quick way to get a Linux environment, or even multiple different ones, running on a Windows host.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yccheok/jstock/issues/139?email_source=notifications&email_token=AACLINGY7ERBFDVWQYKJQPLQUVSA3A5CNFSM4I5ZYXAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEESUM4Q#issuecomment-556090994, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLINFHURYJFVOLVIH5UD3QUVSA3ANCNFSM4I5ZYXAA .

yccheok commented 5 years ago

@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 commented 5 years ago

Didn't test extensively, but it seems to work fine now using OpenJDK 11 with OpenJFX. Thank you!