29
29
JavaVM * jvm ;
30
30
JavaVMAttachArgs jvm_attach_args = {
31
31
.version = JNI_VERSION_1_4 ,
32
- .name = "JNativeHook Native Hook" ,
32
+ .name = "JNativeHook Hook Thread " ,
33
33
.group = NULL
34
34
};
35
35
@@ -43,38 +43,6 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
43
43
// Create all the global class references onload to prevent class loader
44
44
// issues with JNLP and some IDE's.
45
45
if (jni_CreateGlobals (env ) == JNI_OK ) {
46
- #ifndef USE_QUIET
47
- jclass PrintStream_class = (* env )-> FindClass (env , "java/io/PrintStream" );
48
- jfieldID out_id = (* env )-> GetStaticFieldID (env , java_lang_System -> cls , "out" , "Ljava/io/PrintStream;" );
49
-
50
- if (PrintStream_class != NULL && out_id != NULL ) {
51
- jmethodID println_id = (* env )-> GetMethodID (env , PrintStream_class , "println" , "(Ljava/lang/String;)V" );
52
- jobject out = (* env )-> GetStaticObjectField (env , PrintStream_class , out_id );
53
-
54
- if (println_id != NULL && out != NULL ) {
55
- jstring copyright = (* env )-> NewStringUTF (env , "\n"
56
- "JNativeHook: Global keyboard and mouse hooking for Java.\n"
57
- "Copyright (C) 2006-2015 Alexander Barker. All Rights Received.\n"
58
- "https://github.com/kwhat/jnativehook/\n"
59
- "\n"
60
- "JNativeHook is free software: you can redistribute it and/or modify\n"
61
- "it under the terms of the GNU Lesser General Public License as published\n"
62
- "by the Free Software Foundation, either version 3 of the License, or\n"
63
- "(at your option) any later version.\n"
64
- "\n"
65
- "JNativeHook is distributed in the hope that it will be useful,\n"
66
- "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
67
- "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
68
- "GNU General Public License for more details.\n"
69
- "\n"
70
- "You should have received a copy of the GNU Lesser General Public License\n"
71
- "along with this program. If not, see <http://www.gnu.org/licenses/>.\n" );
72
-
73
- (* env )-> CallVoidMethod (env , out , println_id , copyright );
74
- }
75
- }
76
- #endif
77
-
78
46
// Set Java logger for native code messages.
79
47
hook_set_logger_proc (& uiohook_LoggerCallback );
80
48
0 commit comments