Home > Back-end >  Add ActiveMQ Gradle Dependencies to JavaFX Project
Add ActiveMQ Gradle Dependencies to JavaFX Project

Time:04-26

I'm trying to add an activemq dependency to a JavaFX project.

dependencies {
   testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
   testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
   
   implementation 'org.apache.activemq:activemq-all:5.17.0'
}

However, it doesn't seem to work, I've also tried other dependencies and get the same error:

java.lang.module.FindException: Module activemq.all not found, required by...

I've also found that adding the following dependency should help:

implementation 'org.apache.activemq:activemq-broker:5.14.3'

However, this also didn't work as I got 100 errors displayed in my IDE. All along the lines of: enter image description here

Since importing other dependencies also doesn't work I guess there's a fundamental error that I'm making but I'm not sure what it is... Is there another way to add (activemq) gradle dependecies to JavaFX projects?

CodePudding user response:

You just have to add static to your requires statement. So instead of:

requires activemq.all;
you'd need
requires static activemq.all;

  • Related