20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #include <stdio.h>
27 #include <dlfcn.h>
28 #include <string.h>
29 #include <stdlib.h>
30 #include <jni.h>
31 #include <jni_util.h>
32 #include <jvm.h>
33 #include "gdefs.h"
34
35 #include <sys/param.h>
36 #include <sys/utsname.h>
37
38 #include "awt_Plugin.h"
39
40 #ifdef DEBUG
41 #define VERBOSE_AWT_DEBUG
42 #endif
43
44 static void *awtHandle = NULL;
45
46 typedef jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved);
47
48 /* Initialize the Java VM instance variable when the library is
49 first loaded */
50 JavaVM *jvm;
51
52 JNIEXPORT jboolean JNICALL AWTIsHeadless() {
53 static JNIEnv *env = NULL;
54 static jboolean isHeadless;
55 jmethodID headlessFn;
56 jclass graphicsEnvClass;
57
58 if (env == NULL) {
59 env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #include <stdio.h>
27 #include <dlfcn.h>
28 #include <string.h>
29 #include <stdlib.h>
30 #include <jni.h>
31 #include <jni_util.h>
32 #include <jvm.h>
33 #include "gdefs.h"
34
35 #include <sys/param.h>
36 #include <sys/utsname.h>
37
38 #include "awt_Plugin.h"
39
40 #ifdef AIX
41 #include "porting_aix.h" /* For the 'dladdr' function. */
42 #endif
43
44 #ifdef DEBUG
45 #define VERBOSE_AWT_DEBUG
46 #endif
47
48 static void *awtHandle = NULL;
49
50 typedef jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved);
51
52 /* Initialize the Java VM instance variable when the library is
53 first loaded */
54 JavaVM *jvm;
55
56 JNIEXPORT jboolean JNICALL AWTIsHeadless() {
57 static JNIEnv *env = NULL;
58 static jboolean isHeadless;
59 jmethodID headlessFn;
60 jclass graphicsEnvClass;
61
62 if (env == NULL) {
63 env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
|