My JavaFx project stopped compiling

Bug #1825054 reported by Kristof Szilagyi
54
This bug affects 12 people
Affects Status Importance Assigned to Milestone
openjfx (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

My JavaFx project stopped compiling as it doesn't find the libraries anymore. I see a change today in the folders of openjdk, but no new files so I assume javafx files have been removed. There has been an upgrade today for javafx.
The project worked a few days ago and it still compiles on the build server.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: openjfx 11.0.2+1-1~18.04.2
ProcVersionSignature: Ubuntu 4.15.0-47.50-generic 4.15.18
Uname: Linux 4.15.0-47-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Apr 16 22:48:23 2019
InstallationDate: Installed on 2017-07-09 (646 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
SourcePackage: openjfx
UpgradeStatus: Upgraded to bionic on 2018-09-08 (220 days ago)

Revision history for this message
Kristof Szilagyi (szkster) wrote :
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Please answer these questions:
* What specific steps should we take to recreate this bug? Please try to provide the simplest reproducer you can.
* What was the expected and the actual output?

This will help us to find and resolve the problem.

Please be aware that OpenJFX 8 is no longer supported upstream (see message [1]) thus OpenJFX has been updated to the latest upstream version of OpenJFX 11.

[1] https://mail.openjdk.java.net/pipermail/openjfx-dev/2019-January/023039.html

Changed in openjfx (Ubuntu):
status: New → Incomplete
Steve Langasek (vorlon)
tags: added: regression-update
Revision history for this message
Ondřej Pejša (sejpakcze) wrote :

i have this problem too. After newest update i do not have javaFX jar file ...
This is also my post : https://askubuntu.com/questions/1134654/i-do-not-have-javafx-after-newest-update

Revision history for this message
Kristof Szilagyi (szkster) wrote :

I am not sure how to reproduce this. My build was working one day and stopped the other day. Given I don't know what happened and what the status was before it's hard to tell. I suspect the JavaFX jar file has vanished. And yes, I am using Java 8 so that might be it.

I will try to upgrade to Java 11 (I did try that before and some of my tools stopped working but hopefully by now they are fixed)

Revision history for this message
Kristof Szilagyi (szkster) wrote :

I managed to fix this for myself. I did upgrade to java 11 and then followed https://github.com/scalafx/scalafx on how to fix my build.sbt. Similar instructions for other build systems can be found here: https://openjfx.io/openjfx-docs/

Revision history for this message
zprd (zprd) wrote :

I confirm classes are missing to be able to compile with OpenJDK8, I know policies are changing for jdk ecosystem, but in an LTS version we all expect packages to be reliable during supported period. So not being able to compile from from day to another is somehow surprising.

here is what I got:

$ dpkg -l | grep openjfx
ii libopenjfx-java 11.0.2+1-1~18.04.2 all JavaFX/OpenJFX - Rich client application platform for Java (Java libraries)
ii libopenjfx-jni 11.0.2+1-1~18.04.2 amd64 JavaFX/OpenJFX - Rich client application platform for Java (native libraries)
ii openjfx 11.0.2+1-1~18.04.2 amd64 JavaFX/OpenJFX - Rich client application platform for Java
ii openjfx-source 11.0.2+1-1~18.04.2 all JavaFX/OpenJFX - Rich client application platform for Java (sources)

$ apt-file list openjfx | grep jfxrt.jar
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar

$ ls /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar
ls: cannot access '/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar': No such file or directory

$ dpkg -L openjfx
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/openjfx
/usr/share/doc/openjfx/TODO.Debian
/usr/share/doc/openjfx/changelog.Debian.gz
/usr/share/doc/openjfx/copyright
/usr/share/openjfx
/usr/share/openjfx/lib
/usr/share/openjfx/lib/javafx.properties
/usr/share/openjfx/lib/javafx.base.jar
/usr/share/openjfx/lib/javafx.controls.jar
/usr/share/openjfx/lib/javafx.fxml.jar
/usr/share/openjfx/lib/javafx.graphics.jar
/usr/share/openjfx/lib/javafx.media.jar
/usr/share/openjfx/lib/javafx.swing.jar
/usr/share/openjfx/lib/javafx.web.jar

Revision history for this message
nicolas melchior (nicolas-melchior-9) wrote :

I have exactly the same problem, i cannot work with javafx anymore.
Openjfx does not contain the jfxrt file even if it's listed with apt file

Revision history for this message
Marco Righele (marco-righele) wrote :

I have the same issue too.
Can I guess that it is related to this recent announcement https://blog.ubuntu.com/2019/04/19/announcing-openjdk-11-packages-in-ubuntu-18-04-lts ?

There are a number files missing (two that I noticed: jfxrt.jar and javapackager).
I suspect that with the move openjfx has been "upgraded" from the version for Java 8 to the version for Java 11, losing a few files here and there. Searching for aforementioned files with apt-file I can see that they are supposed to be in openjdk8 related locations, but are not there anymore.

$ apt-file search javapackager
openjfx: /usr/bin/javapackager
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/bin/javapackager
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1/javapackager.1.gz
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/man/man1/javapackager.1.gz
openjfx: /usr/share/man/man1/javapackager.1.gz

$ apt-file search jfxrt.jar
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar

Note that I have both openjdk8 and openjdk11 installed, but javafx doesn't work anymore with either.

Revision history for this message
nicolas melchior (nicolas-melchior-9) wrote :

With all these comment it's still incomplete?

The steps to reproduce this are:

Install openjdk and openjfx, but no javafx app can work or compile within eclipse

Revision history for this message
koko-ng (kokong) wrote :

As mentioned by Marco Righele (#8), I think it is related to the update to openjdk 11, as the openjfx and libopenjfx-java are now upgraded from 8u161-b12-1ubuntu2 to 11.0.2+1-1~18.04.2 and 11* packages don't contain the files for openjdk-8. To fix the issue I had to downgrade these two packages and add the lib back in eclipse, i.e. sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2

Revision history for this message
Aarjav Patel (aarjavp) wrote :

I have a jar of a javafx application which I want to run, and I do not have the source code of the application. AFAIK, it has to run in java 8 with min version 8u171. On my machine I had opendk-11-jdk, openjdk-8-jdk, and openjfx installed, and ran the app with openjdk's java 8. On the 13th several openjdk packages were updated, unfortunately I do not have the full list. After the updates, the application threw class not found for the javafx application class on start up.
Downgrading just openjfx with:
sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2
seems to work (I see the app gui), but from the terminal I see an exception for a different class not found: com.sun.deploy.uitoolkit.impl.fx.HostServicesFactory

Revision history for this message
Jehan (zebjehan) wrote :

I have faced the same problem. I have been working with "dl4j-examples" which are some example codes that uses the java based deep learning libraries from github.com. A month earlier it was ok and everything was doing fine, but from yesterday the compiler is unable to fitch the javaFX libraries and so complain about their existence. If you want to reproduce this error one should follow the following steps:
1- install java openjdk-1.8
2- install java FX
3- Dowload dl4j-examples probably using the git function from the: $ git clone https://github.com/deeplearning4j/dl4j-examples.git
4- cd dl4j-examples/
5- use the maven command (maven ustility should be installed before) to build the dl4j-examples project using the command: $mvn clean install

We are almost stuck here, so please resolve it...

Revision history for this message
bmaupin (bmaupin) wrote :

To downgrade openjfx to version 8 and put the packages on hold so they don't get updated the next time you do a system update:

sudo apt install libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx=8u161-b12-1ubuntu2
sudo apt-mark hold libopenjfx-java libopenjfx-jni openjfx

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openjfx (Ubuntu) because there has been no activity for 60 days.]

Changed in openjfx (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.