equal
deleted
inserted
replaced
3456 !create_numbered_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) { |
3456 !create_numbered_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) { |
3457 return JNI_ENOMEM; |
3457 return JNI_ENOMEM; |
3458 } |
3458 } |
3459 #endif |
3459 #endif |
3460 |
3460 |
3461 // If we are running in a headless jre, force java.awt.headless property |
|
3462 // to be true unless the property has already been set. |
|
3463 // Also allow the OS environment variable JAVA_AWT_HEADLESS to set headless state. |
|
3464 if (os::is_headless_jre()) { |
|
3465 const char* headless = Arguments::get_property("java.awt.headless"); |
|
3466 if (headless == NULL) { |
|
3467 const char *headless_env = ::getenv("JAVA_AWT_HEADLESS"); |
|
3468 if (headless_env == NULL) { |
|
3469 if (!add_property("java.awt.headless=true")) { |
|
3470 return JNI_ENOMEM; |
|
3471 } |
|
3472 } else { |
|
3473 char buffer[256]; |
|
3474 jio_snprintf(buffer, sizeof(buffer), "java.awt.headless=%s", headless_env); |
|
3475 if (!add_property(buffer)) { |
|
3476 return JNI_ENOMEM; |
|
3477 } |
|
3478 } |
|
3479 } |
|
3480 } |
|
3481 |
|
3482 if (!check_vm_args_consistency()) { |
3461 if (!check_vm_args_consistency()) { |
3483 return JNI_ERR; |
3462 return JNI_ERR; |
3484 } |
3463 } |
3485 |
3464 |
3486 #if INCLUDE_JVMCI |
3465 #if INCLUDE_JVMCI |