Skip to content

Commit 7f84207

Browse files
committed
Fixed default thread name.
Removed LGPL on start.
1 parent 803aeea commit 7f84207

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

src/jni/jni_Load.c

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
JavaVM *jvm;
3030
JavaVMAttachArgs jvm_attach_args = {
3131
.version = JNI_VERSION_1_4,
32-
.name = "JNativeHook Native Hook",
32+
.name = "JNativeHook Hook Thread",
3333
.group = NULL
3434
};
3535

@@ -43,38 +43,6 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
4343
// Create all the global class references onload to prevent class loader
4444
// issues with JNLP and some IDE's.
4545
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-
7846
// Set Java logger for native code messages.
7947
hook_set_logger_proc(&uiohook_LoggerCallback);
8048

0 commit comments

Comments
 (0)