I have made a small program that simulates mouse movements. Everything has worked as supposed to so far till i added the jnativehook library for listening to keyboard input to stop the program.
After this the problems started to occur, when i launch my program from the IDE (im using intelij) everything works. But when i build the program into a jar the jar wont launch giving this error: error code
i have tried to add the path like this java -classpath .;jnativehook-2.1.0.jar Main (found this methode here but it doesn't work) also placed the nativehook.jar in my dir but this also didn't help. My project structure looks like this atm: project settings
I'm new to adding library's to projects, can anyone help me solve this problem ?