mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8195857: Remove os::is_headless_jre
Reviewed-by: goetz, dholmes
This commit is contained in:
parent
48e6e1e6c4
commit
b2609808df
7 changed files with 0 additions and 218 deletions
|
@ -3458,27 +3458,6 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
|
|||
}
|
||||
#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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue