holgerbrandl / opencards

A free flashcard learning application for PowerPoint and MarkDown files
http://opencards.info
BSD 2-Clause "Simplified" License
96 stars 27 forks source link

Does not work in Java 11 in Ubuntu #56

Open aphsa opened 4 years ago

aphsa commented 4 years ago
$ java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)

$ java -Xmx512m -jar opencards.jar
problem report submission failed because of java.net.URISyntaxException: Illegal character in opaque part at index 680: mailto:support@opencards.info?subject=OpenCards%20problem%20report:%20info.opencards.ui.ltmstats.LongTermMemStatsPanel.initComponents(LongTermMemStatsPanel.java:68)&body=Dear%20OpenCards-team,%0D%0A%0D%0Athe%20following%20problem%20occurred%20while%20I%20was%20using%20OpenCards:%20%0D%0A%0D%0AOpenCards%20version:%202.5%0D%0APlatform:%20Linux%204.15.0-123-genericJava%20Version:%2011.0.9.1%20-%20Ubuntu%0D%0A%0D%0AThread[main,5,main]%0D%0A%0D%0Ajava.lang.NoClassDefFoundError:%20org/jfree/data/category/CategoryDataset%0D%0A%0D%0Ainfo.opencards.ui.ltmstats.LongTermMemStatsPanel.initComponents(LongTermMemStatsPanel.java:68)%0D%0Ainfo.opencards.ui.ltmstats.LongTermMemStatsPanel.<init>(LongTermMemStatsPanel.java:30)%0D%0Ainfo.opencards.ui.LearnManagerUI.initComponents(LearnManagerUI.java:279)%0D%0Ainfo.opencards.ui.LearnManagerUI.<init>(LearnManagerUI.java:58)%0D%0Ainfo.opencards.OpenCards.<init>(OpenCards.java:96)%0D%0Ainfo.opencards.OpenCards.main(OpenCards.java:41)%0D%0A%0D%0A%0D%0AAdd%20more%20comments%20here%20if%20necessary!!%0D%0A%0D%0A%20Best,%20...

Yes openjfx is already installed.

holgerbrandl commented 3 years ago

I think the issue is that javafx is no longer bundled with the openjdk. Not sure how to fix that. Help would be welcome here.

SubOptimal commented 1 year ago

Even it's already an older issue.

The reported error looks more like an issue with the JAVA_PATH

(extracted from the initial post)

the following problem occurred while I was using OpenCards: 

OpenCards version: 2.5
Platform: Linux 4.15.0-123-genericJava Version: 11.0.9.1 - Ubuntu

Thread[main,5,main]

java.lang.NoClassDefFoundError: org/jfree/data/category/CategoryDataset

info.opencards.ui.ltmstats.LongTermMemStatsPanel.initComponents(LongTermMemStatsPanel.java:68)
info.opencards.ui.ltmstats.LongTermMemStatsPanel.<init>(LongTermMemStatsPanel.java:30)
info.opencards.ui.LearnManagerUI.initComponents(LearnManagerUI.java:279)
info.opencards.ui.LearnManagerUI.<init>(LearnManagerUI.java:58)
info.opencards.OpenCards.<init>(OpenCards.java:96)
info.opencards.OpenCards.main(OpenCards.java:41)

Add more comments here if necessary!!

 Best, ...

despite that error it seems that with Java 11 and JFX there was a change introduced which breaks OpenCards

OpenJDK Runtime Environment (build 11.0.20.1+1-post-Ubuntu-0ubuntu120.04)

OpenCards version: 2.5
Platform: Linux 5.15.0-87-genericJava Version: 11.0.20.1 - Ubuntu

Thread[AWT-EventQueue-0,6,main]

java.lang.NoClassDefFoundError: javafx/scene/Parent

info.opencards.CardFileBackend.getSlideManager(CardFileBackend.java:52)
info.opencards.ui.AbstractLearnDialog.prepareFileSession(AbstractLearnDialog.java:159)
info.opencards.core.LearnProcessManager.startProcessing(LearnProcessManager.java:93)
info.opencards.core.LearnProcessManager.startProcessing(LearnProcessManager.java:63)
info.opencards.ui.actions.StartLearningAction.learnCardFiles(StartLearningAction.java:166)
info.opencards.ui.actions.StartLearningAction.actionPerformed(StartLearningAction.java:64)
java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)

Add more comments here if necessary!!

 Best, ...

it fails the same for Oracle Java(TM) SE Runtime Environment 18.9 (build 11.0.20+9-LTS-256) but it still works with Azul OpenJDK Runtime Environment Zulu11.66+19-CA (build 11.0.20.1+1-LTS).