--- a/src/hotspot/share/runtime/arguments.cpp Wed Jan 24 18:00:36 2018 -0500
+++ b/src/hotspot/share/runtime/arguments.cpp Sun Jan 28 19:49:06 2018 -0500
@@ -3458,27 +3458,6 @@
}
#endif
- // If we are running in a headless jre, force java.awt.headless property
- // to be true unless the property has already been set.
- // Also allow the OS environment variable JAVA_AWT_HEADLESS to set headless state.
- if (os::is_headless_jre()) {
- const char* headless = Arguments::get_property("java.awt.headless");
- if (headless == NULL) {
- const char *headless_env = ::getenv("JAVA_AWT_HEADLESS");
- if (headless_env == NULL) {
- if (!add_property("java.awt.headless=true")) {
- return JNI_ENOMEM;
- }
- } else {
- char buffer[256];
- jio_snprintf(buffer, sizeof(buffer), "java.awt.headless=%s", headless_env);
- if (!add_property(buffer)) {
- return JNI_ENOMEM;
- }
- }
- }
- }
-
if (!check_vm_args_consistency()) {
return JNI_ERR;
}