why do i get these errors?
<p><em>Code :</em></p>

<pre><code>package keylogger;

import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;
import org.jnativehook.keyboard.NativeKeyListener;

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

            if (e.getKeyCode() == NativeKeyEvent.VK_ESCAPE) {
                    try {
                            GlobalScreen.unregisterNativeHook(); // LINE 18
                    }
                    catch (NativeHookException ex) {
                            System.err.println("You cannot call unregisterNativeHook() from the native dispatch thread.");
                    }
            }
    }


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

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


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

            //Construct the example object and initialze native hook.
            GlobalScreen.getInstance().addNativeKeyListener(new GlobalKeyListenerExample());
    }
}
</code></pre>

<p>This is same code as given <a href="http://code.google.com/p/jnativehook/wiki/examples" rel="nofollow">here on google code</a>. I downloaded and then used the <a href="http://code.google.com/p/jnativehook/downloads/list" rel="nofollow">JNativeHost library</a> in my project. But i get the following errors :</p>

<pre><code>Cannot find unregisterNativeHook,registerNativeHook. //(line 18,38)
The IDE also says GlobalKeyListenerExample is not abstract and doesn't override abstract method keyReleased. 
</code></pre>

<p>To the first error <a href="http://code.google.com/p/jnativehook/source/browse/trunk/src/java/org/jnativehook/GlobalScreen.java" rel="nofollow">the methods are defined here and they are native methods</a> and i also have imported  the GlobalScreen class.</p>

<p>And why do i get the second error when i have already overrided that ? <strong>But when i add a <code>@Override</code> annotation before that method IDE gives an error saying the method doesn't override or implement from a supertype.</strong></p>
