saalfeldlab / paintera

GNU General Public License v2.0
99 stars 17 forks source link

Add compatibility with Java 13 #400

Closed igorpisarev closed 3 years ago

igorpisarev commented 4 years ago

Currently, Paintera works only with Java 8. If running with Java 9+, NoClassDefFoundException will be printed as reported in #398.

Some work has been made in this PR to add compatibility with Java 13, which also allows us to use JavaFX 13 and its new API, such as PixelBuffer for writing into JavaFX images directly instead of having to use reflection to do it.

The PR is not ready yet and there is still a few things to do:

hanslovsky commented 4 years ago

That's awesome!!

hanslovsky commented 4 years ago

I don't know if it is relevant for us but people saw bad performance when migrating from Java 8 to 11: https://twitter.com/shipilev/status/1242078941659217920

igorpisarev commented 4 years ago

For anyone continuing to work on this PR, this is the command that I used to run and debug the application:

mvn javafx:run

(it's provided by maven-javafx-plugin which was added to pom.xml in this PR)

igorpisarev commented 4 years ago

The distribution of the application will probably need to change with this PR too. Since JavaFX 13 is available through Maven directly and the users will not need to install a runtime dependency, it may be worthwhile to switch to building and distributing an uber jar that contains all dependencies. This will require only a standard JRE installation to run Paintera on users' machines without any other prerequisites such as JDK and Maven.

cmhulbert commented 3 years ago
  • There are problems with certain shortcuts: for example, Ctrl+Shift+Scroll doesn't work in 3D viewer anymore for some reason.

Addressed by a3bc181958a606e4bdaacd526556b60c76a905ea. JavaFx now interprets Shift+Scroll as a horizontal scroll, so querying for the DeltaY was always 0.0. Solution uses the JavaFx ControlUtils to get scroll axis with the largest delta magnitude. This is consistent with how the orthographic slice scrolling works.