-1

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 ?

Neko
  • 18
  • 5
  • Please share more details and the error messages in text form, not as images – Nico Haase Nov 08 '18 at 16:33
  • Possible duplicate of [Adding external library to artifact jar in IntelliJ IDEA](https://stackoverflow.com/questions/42196697/adding-external-library-to-artifact-jar-in-intellij-idea) – tevemadar Nov 08 '18 at 16:35
  • 1
    Also see their site: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206181699-Include-external-lib-jars-in-an-artifact-jar- – tevemadar Nov 08 '18 at 16:35

1 Answers1

0

Hey thanks all for your answers, @tevemadar I was able to figure it out with the help from your link of the intelij website. Much appreciated i been trying to get it to work for 4-5.

Neko
  • 18
  • 5