LeVanPhuUIT / jnativehook

Automatically exported from code.google.com/p/jnativehook
0 stars 0 forks source link

compile error: Compiler can not find the registerNativeHook() method in GlobalScreen #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Compiler can not find the registerNativeHook() method in GlobalScreen
================================================
Compile 
E:\MyProjects\java\counter\JNativeHook\org\jnativehook\example\NativeHookDemo.ja
va with Java-Compiler
NativeHookDemo.java:77:33: cannot find symbol
symbol  : method registerNativeHook()
location: class org.jnativehook.GlobalScreen
      GlobalScreen.getInstance().registerNativeHook();
                                ^
NativeHookDemo.java:309:33: cannot find symbol
symbol  : method unregisterNativeHook()
location: class org.jnativehook.GlobalScreen
      GlobalScreen.getInstance().unregisterNativeHook();
                                ^
2 errors

================================================
Compile 
E:\MyProjects\java\counter\JNativeHook\org\jnativehook\example\NativeHookDemo.ja
va with Java-Compiler
org\jnativehook\example\NativeHookDemo.java:78:33: registerHook() has protected 
access in org.jnativehook.GlobalScreen
      GlobalScreen.getInstance().registerHook();
                                ^
org\jnativehook\example\NativeHookDemo.java:310:33: unregisterHook() has 
protected access in org.jnativehook.GlobalScreen
      GlobalScreen.getInstance().unregisterHook();
                                ^
2 errors

Original issue reported on code.google.com by mabs...@gmail.com on 10 Feb 2012 at 5:20

GoogleCodeExporter commented 8 years ago
Can you provide more detail on what you are trying to compile and how.  I am 
guessing you are trying to build only the NativeHookDemo.java class without 
specifying the location of JNativeHook.jar in your IDE's class path.

Original comment by heispsyc...@gmail.com on 10 Feb 2012 at 7:04

GoogleCodeExporter commented 8 years ago
Thank you for the ready response.
I am compiling only the NativeHookDemo.java. It works fine if I comment out the 
lines doing registerNativeHook and unregisterNativeHook, only with the problem 
that my IDE (javaeditor) crashes after I stop running (or close) the 
application. I have to restart the IDE afterwards. 
I do have JNativeHook.jar in the classpath. 

Original comment by mabs...@gmail.com on 11 Feb 2012 at 4:42

GoogleCodeExporter commented 8 years ago
Hello Again,
This time I compiled by downloading the sourcecode zip file and found no issue. 
I think I were using an updated file that did not match the JNativeHook.jar 

The problem occurred for source code at: 
http://jnativehook.googlecode.com/svn-history/r424/trunk/src/java/org/jnativehoo
k/example/NativeHookDemo.java

Original comment by mabs...@gmail.com on 11 Feb 2012 at 5:20

GoogleCodeExporter commented 8 years ago
The trunk is currently under development and is probably unstable and 
unreliable.  If you would like to checkout the project from subversion please 
use the latest from the tags for the time being.

Original comment by heispsyc...@gmail.com on 11 Feb 2012 at 6:27