Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
Maven not finding dependencies in IntelliJ

I'm new to Maven and not quite sure what it's for but I thought it was for importing external libraries so that they are available while coding. I have imported the dependency and there's no error on it as can be seen here:

enter image description here

But when typing the import it all just comes up in red as if it's not found. It's not finding anything.

enter image description here

And if I paste the whole import line in it gets deleted automatically.

Is this not what Maven is supposed to do or is there something else to do before it will work? I also have it set to import Maven projects automatically.

EDIT: Just for clarity, of course it's in my pom.xml file otherwise it wouldn't be showing up in the external libraries in the screenshot above:

<dependencies>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-controls</artifactId>
        <version>11</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-graphics</artifactId>
        <version>11</version>
    </dependency>
    <dependency>
        <groupId>uk.co.caprica</groupId>
        <artifactId>vlcj</artifactId>
        <version>4.5.0</version>
    </dependency>
    <dependency>
        <groupId>uk.co.caprica</groupId>
        <artifactId>vlcj-javafx</artifactId>
        <version>1.0.2</version>
    </dependency>
</dependencies>

Additional EDIT: Some screenshots to show that typing the classes directly does not work any better. Intellij is just not finding anything:

enter image description here enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It seems this particular dependency is modularised per the Java Platform Module System. So, we need requires in the module-info.java file.

module com.sample {
    requires javafx.controls;
    exports com.sample;
    requires transitive javafx.graphics;
    requires uk.co.caprica.vlcj;
    requires uk.co.caprica.vlcj.javafx;
}

After this the dependency is suddenly visible and fully usable within the code.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!