Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

317
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda