< prev index next >
src/java.desktop/unix/native/libawt_headless/awt/HeadlessToolkit.c
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -29,16 +29,19 @@
#ifdef HEADLESS
extern JavaVM *jvm;
JNIEXPORT jint JNICALL
-JNI_OnLoad(JavaVM *vm, void *reserved)
+DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
{
jvm = vm;
return JNI_VERSION_1_2;
}
+#ifndef STATIC_BUILD
+// The same function exists in libawt.a::awt_LoadLibrary.c
JNIEXPORT jboolean JNICALL AWTIsHeadless() {
return JNI_TRUE;
}
+#endif
#endif
< prev index next >