0

I trying to run tutorial code from VWorkflow (I've just copied code and only package changed). Before this code it works. I have requires and dependencies in code to this library. Everythings seems to be OK but only ScalableContentPane is not working and because this my code doesn't run. I add jfxtras dependences in pom.xml

<dependency>
    <groupId>org.jfxtras</groupId>
    <artifactId>jfxtras-labs</artifactId>
    <version>8.0-r6</version>
</dependency>

And also I add requires to module-info.java

requires jfxtras.labs;

And my importing code.

import jfxtras.labs.scene.layout.ScalableContentPane;

But when I trying to run this app build output gives me that error

java: the unnamed module reads package jfxtras.labs.util.event from both jfxtras.labs and vworkflows.fx

as main error. And another error in module-info errors

java: module com.example.learningfx reads package jfxtras.labs.util.event from both jfxtras.labs and vworkflows.fx

There is all errors

Errors in build output

I'm using IntelliJ and use JavaFX to build. If you need VWorkflow github. What do I need to do?

Pixtane
  • 39
  • 8
  • 1
    Does this answer your question? [JavaFx with Maven - Error Module 'sample' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'](https://stackoverflow.com/questions/68246910/javafx-with-maven-error-module-sample-reads-package-javafx-beans-from-both) – Giovanni Contreras May 19 '22 at 20:16
  • Might be best to [convert to a non-modular project](https://openjfx.io/openjfx-docs/). Don't provide a `module-info.java` and have some of your dependent libraries like workflows and jfxtras loaded from classpath rather than module path. It would seem from the error that workflows is not updated to work well within the JavaFX module system when combined with a project which also uses jfxtras. Likely, to make it work in a modular environment would require a fix or patch of the vworkflow code (I have no suggestions for that at this time). – jewelsea May 19 '22 at 20:55

1 Answers1

0

First of all you're using JFXtras labs, which is experimental and unsupported code, so if it does not work anymore, then that's it. It's called labs for a reason :-)

But apparently you are using a version of Java with JPMS, 9+, then you should also use JFXtras 9 or 11. You are currently using JFXtras 8.

tbeernot
  • 2,473
  • 4
  • 24
  • 31
  • And which version in pom.xml I need to write? 11.0 and 9.0 doesn't recognize, and in jfxtras site I found only 8.0-r6? – Pixtane May 21 '22 at 07:09
  • We haven snapshots https://oss.sonatype.org/content/repositories/snapshots/org/jfxtras/jfxtras-labs/ and a 9 release https://search.maven.org/search?q=jfxtras-labs – tbeernot May 21 '22 at 15:56
  • If type 11-r2 it doesn't find it. Maybe I need to download snapshot and put it somewhere? – Pixtane May 22 '22 at 12:32
  • You need to add the sonatype snapshot repository to your pom https://stackoverflow.com/questions/7715321/how-to-download-snapshot-version-from-maven-snapshot-repository – tbeernot May 22 '22 at 16:08