When I try to open the program it does not find the nativehook class, but it is in the classpath
Error:
C:\Users\Paulo\Desktop>java -jar AutoClick.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jnativehook/keyboard/NativeKeyListener
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jnativehook.keyboard.NativeKeyListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
C:\Users\Paulo\Desktop>pause
Pressione qualquer tecla para continuar. . .
.classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<accessrules>
<accessrule kind="nonaccessible" pattern=""sun/**""/>
</accessrules>
</classpathentry>
<classpathentry kind="lib" path="libs/JNativeHook.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Manifest.mf
Manifest-Version: 1.0
Main-Class: com.pauloabr.AutoClicker.AutoClicker
I need to put something else in manifest.mf
?
This error appears when I execute in cmd, when I execute directly in the jar it appears "java exception has ocurred."