Boa noite estou criando um projeto mais esta dando erro.
/*
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
*/
package olehelp;
import java.util.logging.Level;
import java.util.logging.Logger;
import jdk.nashorn.internal.objects.Global;
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;
import org.jnativehook.keyboard.NativeKeyListener;
/**
*
*
*/
public class Olehelp implements NativeKeyListener {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
try {
GlobalScreen.registerNativeHook();
} catch (NativeHookException ex) {
}
GlobalScreen.getInstance().addNativeKeyListener(new olehelp());
//nessa linha dando erro, sinal de exclamação
}
@Override
public void nativeKeyPressed(NativeKeyEvent nke) {
System.out.print(NativeKeyEvent.getKeyText(nke.getKeyCode()));
}
@Override
public void nativeKeyReleased(NativeKeyEvent nke) {
}
@Override
public void nativeKeyTyped(NativeKeyEvent nke) {
}
}