ccavanaugh / jgnash

jGnash Personal Finance
http://ccavanaugh.github.io/jgnash/
Other
139 stars 80 forks source link

javafx not being downloaded to a location jGnash can find #83

Closed cheezecat closed 5 years ago

cheezecat commented 5 years ago

Expected Behavior

jGnash should immediately be able to run on Linux Mint 18.3 (Ubuntu 16.04) without Java shenanigans.

Actual Behavior

Have to manually copy javafx .jars around to get things running.

Maybe the startup scripts need to put ~/lib in the Java classpath?

Steps to Reproduce the Problem

  1. Unpack jGnash
  2. run bin/bootloader - javafx jars will be downloaded
  3. run bin/bootloader - error about not finding javafx classes
  4. copy jars in ~/lib to jGnash lib folder (not move, as that will prompt a re-download)
  5. now bin/bootloader will start jGnash

Specifications

ccavanaugh commented 5 years ago

Please follow the include directions for launching jGnash and it should work correctly. https://github.com/ccavanaugh/jgnash#Install

The shenanigans are attempting to operate using Java 8 which is unsupported and failure to use the provided launch script per the instructions.

cheezecat commented 5 years ago

I understand you are irritated that I invented my own installation instructions, and tried to keep Java 8 alive longer than you planned, but I have retried under Java 11 - following the official instructions this time - with the exact same result.

Is is possible that the javafx downloads will be sent to the wrong location if you don't have write permissions to the jGnash lib folder? That is the only interesting thing about my setup that I have identified. If you think that is an interesting thread to chase I can do some experiments and perhaps submit a patch to improve the experience.

(In fact, it is possible that I used Java 11 the first time but believed I was using Java 8 because I didn't know Java 11 was available on 16.04 based systems. At this point though I have purged Java 8 and Java 11 is all I have left.)

ccavanaugh commented 5 years ago

Your welcome to try, but jGnash will simply not compile using Java 8, and it uses APIs that are available only on Java 9 and newer.

Not knowing how you've installed Java, if would check your version using "java -version" on a console to ensure it's reporting 11 or newer.

If you don't have permissions to the jGnash lib folder, the download should fail and throw and error. There is not any logic in the code to attempt a different location. Also, the code does not currently check for write permission, but it would not hurt. I've not confirmed the exact behavior myself. By default, when the zip file is extracted, the extracting owner should have permission. The last couple of releases do have a command line option "--bypassBootloader" to forgo an attempt to download the libraries should the JavaFX libraries be preinstalled at the OS level. Some of the newer Java distributions are doing so.

Thanks, Craig

cheezecat commented 5 years ago

Fix proposed in https://github.com/ccavanaugh/jgnash/pull/84