in

Maven doesn’t compile the project with jNativeHook from Github


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>



Source: https://stackoverflow.com/questions/70555285/maven-doesnt-compile-the-project-with-jnativehook-from-github

Moderation — A radically simple food diary and weight tracker

Chatting App in Flutter And Firebase