Probleme de dépendance avec IntellJ IDEA

Résolu
Bonjour,

J'essaye d'ajoute une dépendance a idea mais impossible de l'ajouter

package keylogger;

import com.github.kwhat.jnativehook.GlobalScreen;
import com.github.kwhat.jnativehook.NativeHookException;
import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent;
import com.github.kwhat.jnativehook.keyboard.NativeKeyListener;

public class GlobalKeyListenerExample {
    public void nativeKeyPressed(NativeKeyEvent e) {
        System.out.println("Key Pressed: " + NativeKeyEvent.getKeyText(e.getKeyCode()));

        if (e.getKeyCode() == NativeKeyEvent.VC_ESCAPE) {
            try {
                GlobalScreen.unregisterNativeHook();
            } catch (NativeHookException nativeHookException) {
                nativeHookException.printStackTrace();
            }
        }
    }

    public void nativeKeyReleased(NativeKeyEvent e) {
        System.out.println("Key Released: " + NativeKeyEvent.getKeyText(e.getKeyCode()));
    }

    public void nativeKeyTyped(NativeKeyEvent e) {
        System.out.println("Key Typed: " + e.getKeyText(e.getKeyCode()));
    }

    public static void main(String[] args) {
        try {
            GlobalScreen.registerNativeHook();
        }
        catch (NativeHookException ex) {
            System.err.println("There was a problem registering the native hook.");
            System.err.println(ex.getMessage());

            System.exit(1);
        }

        GlobalScreen.addNativeKeyListener(new GlobalKeyListenerExample());
    }
}



voila une image avec les couleur du programme
https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://drive.google.com/file/d/18ToV1aJnQkWRyZNKuUFhUeNZp3AZ9NIR/view?usp%3Dsharing&followup=https://drive.google.com/file/d/18ToV1aJnQkWRyZNKuUFhUeNZp3AZ9NIR/view?usp%3Dsharing

et voici une image des erreur
https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://drive.google.com/file/d/1wRYslHmqMkT0HPQeJQXCqKvXVgmNO75U/view?usp%3Dsharing&followup=https://drive.google.com/file/d/1wRYslHmqMkT0HPQeJQXCqKvXVgmNO75U/view?usp%3Dsharing

2 réponses

  • Votes
  • Date
  • Date décroissante
  1. Modérateur
    Bonjour,

    Merci de partager tes images avec le bouton prévu à cet effet (juste à côté des boutons gras, italique, souligné et code).
    1. Desole je n'avait pas remarque que l'on pouvait le faire
  2. Essayes d'installer les dépendances avec une extension de maven ou un autre package manager ou l'installer manuellement. Ou essayes de changer l'IDE.
    1. Merci e votre reponse, j'ai essayer de changer IDE, mais ca le change rien. Je vais essayer avec maven ou un autre package.