Я вполне уверен, что у меня все в порядке, но он просто не скомпилирует пример, размещенный на сайте
Вот мой POM. xml
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.1stleg</groupId>
<artifactId>jnativehook</artifactId>
<version>2.1.0</version>
<name>JNativeHook</name>
<description>Global keyboard and mouse listeners for Java.</description>
<url>https://github.com/kwhat/jnativehook</url>
<licenses>
<license>
<name>GNU General Public License (GPL), Version 3.0</name>
<url>https://www.gnu.org/licenses/gpl-3.0.txt</url>
</license>
<license>
<name>GNU Lesser General Public License (LGPL), Version 3.0</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>Alexander Barker</name>
<email>alex@1stleg.com</email>
<organization>Personal</organization>
<organizationUrl>https://github.com/kwhat/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git@github.com:kwhat/jnativehook.git</connection>
<developerConnection>scm:git:git@github.com:kwhat/jnativehook.git</developerConnection>
<url>git@github.com:kwhat/jnativehook.git</url>
</scm>
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <release>12</release> </configuration> </plugin> </plugins> </build>
и вот вывод ошибки из cmd:
PS C:\Users\XXX\IdeaProjects\Defa_Kalenteri\src\main\java> javac -classpath ./JNativeHook.jar
GlobalKeyListenerExample.java
GlobalKeyListenerExample.java:2: error: package org.jnativehook does not exist
import org.jnativehook.GlobalScreen;
^
GlobalKeyListenerExample.java:3: error: package org.jnativehook does not exist
import org.jnativehook.NativeHookException;
^
GlobalKeyListenerExample.java:4: error: package org.jnativehook.keyboard does not exist
import org.jnativehook.keyboard.NativeKeyEvent;
^
GlobalKeyListenerExample.java:5: error: package org.jnativehook.keyboard does not exist
import org.jnativehook.keyboard.NativeKeyListener
Вот мой github , если вы хотите иметь go в нем. Найдите файл GlobalKeyListenerExample. java и попробуйте скомпилировать его.