groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dewful <>
Subject Using Groovy with JavaFX
Date Fri, 02 Jun 2017 17:44:18 GMT
Hi - 

I am new to the Groovy community.

I am using Maven 3.3.9 + Spock Testing Framework + GMavenPlus (1.5) + Groovy
2.4 + JavaFX with Java8 on OSX 11.10. I'm trying to get mvn test to execute
successfully, but the groovy tests I have are not finding the javafx
classes. The errors are like:

java.lang.ClassNotFoundException: javafx.scene.control.MenuBar

I believe the issue I'm having is due to java8 now by default includes the
javafx jar on the classpath
on OSX, which is below java home), it isn't an external dependency in maven.
However, when running groovy with javafx, groovy doesn't seem to have the
javafx jar on its path.

Other projects like seem to
need groovy to specifically specify the jar on the command line using '-cp
'. Also, in gradle I found what I think is a similar bug:

Groovy seems to say that jars added in a ~/.groovy/lib folder will be added
to the classpath, although putting the jfxrt.jar in there didn't seem to
have an effect.

The main question is whats the best way to get groovy to find the javafx
dependency jars so mvn test can succeed? Any suggestions on where maven
would need this?

Thank you!

View this message in context:
Sent from the Groovy Users mailing list archive at

View raw message