0

I have added Jitpack repo and dependency from Github to pom.xml and it still doesn't compile. However, when I point onto the line in import block, it clearly shows the description of a module. VSCode screenshot

For example, I try to import com.github.kwhat.jnativehook.GlobalScreen, it shows the description of the module but still underlines the line with red and shows the error:

The type com.github.kwhat.jnativehook.GlobalScreen is not accessible Java(16778666)

What could be the problem?

Here's a part of pom.xml

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-controls</artifactId>
        <version>13</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-fxml</artifactId>
        <version>13</version>
    </dependency>
    <dependency>
        <groupId>com.github.kwhat</groupId>
        <artifactId>jnativehook</artifactId>
        <version>2.2.1</version>
    </dependency>
    
</dependencies>
awayneff
  • 1
  • 1
  • 1

1 Answers1

0

Just try to synchronize you project.

I add an imagine where can be seen that dependencies is load correctly.enter image description here.

Mihai8
  • 3,113
  • 1
  • 21
  • 31
  • How can I sync it? Is it a command in a terminal or just an order for lines in pom.xml? I tried to compile the project and I get an error in a terminal: package com.github.kwhat.jnativehook is not visible [ERROR] (package com.github.kwhat.jnativehook is declared in the unnamed module, but module gamepad_tester does not read it) – awayneff Jan 02 '22 at 11:45