7110017: is_headless_jre should be updated to reflect the new location of awt toolkit libraries
Reviewed-by: dholmes, dsamersoff
This commit is contained in:
parent
0eb37550d3
commit
9a65ac929d
@ -5778,15 +5778,18 @@ int os::fork_and_exec(char* cmd) {
|
|||||||
|
|
||||||
// is_headless_jre()
|
// is_headless_jre()
|
||||||
//
|
//
|
||||||
// Test for the existence of libmawt in motif21 or xawt directories
|
// Test for the existence of xawt/libmawt.so or libawt_xawt.so
|
||||||
// in order to report if we are running in a headless jre
|
// in order to report if we are running in a headless jre
|
||||||
//
|
//
|
||||||
|
// Since JDK8 xawt/libmawt.so was moved into the same directory
|
||||||
|
// as libawt.so, and renamed libawt_xawt.so
|
||||||
|
//
|
||||||
bool os::is_headless_jre() {
|
bool os::is_headless_jre() {
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
char libmawtpath[MAXPATHLEN];
|
char libmawtpath[MAXPATHLEN];
|
||||||
const char *xawtstr = "/xawt/libmawt" JNI_LIB_SUFFIX;
|
const char *xawtstr = "/xawt/libmawt" JNI_LIB_SUFFIX;
|
||||||
const char *motifstr = "/motif21/libmawt" JNI_LIB_SUFFIX;
|
const char *new_xawtstr = "/libawt_xawt" JNI_LIB_SUFFIX;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
// Get path to libjvm.so
|
// Get path to libjvm.so
|
||||||
@ -5807,9 +5810,9 @@ bool os::is_headless_jre() {
|
|||||||
strcat(libmawtpath, xawtstr);
|
strcat(libmawtpath, xawtstr);
|
||||||
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
||||||
|
|
||||||
// check motif21/libmawt.so
|
// check libawt_xawt.so
|
||||||
strcpy(libmawtpath, buf);
|
strcpy(libmawtpath, buf);
|
||||||
strcat(libmawtpath, motifstr);
|
strcat(libmawtpath, new_xawtstr);
|
||||||
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -5425,15 +5425,18 @@ int os::fork_and_exec(char* cmd) {
|
|||||||
|
|
||||||
// is_headless_jre()
|
// is_headless_jre()
|
||||||
//
|
//
|
||||||
// Test for the existence of libmawt in motif21 or xawt directories
|
// Test for the existence of xawt/libmawt.so or libawt_xawt.so
|
||||||
// in order to report if we are running in a headless jre
|
// in order to report if we are running in a headless jre
|
||||||
//
|
//
|
||||||
|
// Since JDK8 xawt/libmawt.so was moved into the same directory
|
||||||
|
// as libawt.so, and renamed libawt_xawt.so
|
||||||
|
//
|
||||||
bool os::is_headless_jre() {
|
bool os::is_headless_jre() {
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
char libmawtpath[MAXPATHLEN];
|
char libmawtpath[MAXPATHLEN];
|
||||||
const char *xawtstr = "/xawt/libmawt.so";
|
const char *xawtstr = "/xawt/libmawt.so";
|
||||||
const char *motifstr = "/motif21/libmawt.so";
|
const char *new_xawtstr = "/libawt_xawt.so";
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
// Get path to libjvm.so
|
// Get path to libjvm.so
|
||||||
@ -5454,9 +5457,9 @@ bool os::is_headless_jre() {
|
|||||||
strcat(libmawtpath, xawtstr);
|
strcat(libmawtpath, xawtstr);
|
||||||
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
||||||
|
|
||||||
// check motif21/libmawt.so
|
// check libawt_xawt.so
|
||||||
strcpy(libmawtpath, buf);
|
strcpy(libmawtpath, buf);
|
||||||
strcat(libmawtpath, motifstr);
|
strcat(libmawtpath, new_xawtstr);
|
||||||
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -6311,15 +6311,18 @@ int os::fork_and_exec(char* cmd) {
|
|||||||
|
|
||||||
// is_headless_jre()
|
// is_headless_jre()
|
||||||
//
|
//
|
||||||
// Test for the existence of libmawt in motif21 or xawt directories
|
// Test for the existence of xawt/libmawt.so or libawt_xawt.so
|
||||||
// in order to report if we are running in a headless jre
|
// in order to report if we are running in a headless jre
|
||||||
//
|
//
|
||||||
|
// Since JDK8 xawt/libmawt.so was moved into the same directory
|
||||||
|
// as libawt.so, and renamed libawt_xawt.so
|
||||||
|
//
|
||||||
bool os::is_headless_jre() {
|
bool os::is_headless_jre() {
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
char libmawtpath[MAXPATHLEN];
|
char libmawtpath[MAXPATHLEN];
|
||||||
const char *xawtstr = "/xawt/libmawt.so";
|
const char *xawtstr = "/xawt/libmawt.so";
|
||||||
const char *motifstr = "/motif21/libmawt.so";
|
const char *new_xawtstr = "/libawt_xawt.so";
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
// Get path to libjvm.so
|
// Get path to libjvm.so
|
||||||
@ -6340,9 +6343,9 @@ bool os::is_headless_jre() {
|
|||||||
strcat(libmawtpath, xawtstr);
|
strcat(libmawtpath, xawtstr);
|
||||||
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
||||||
|
|
||||||
// check motif21/libmawt.so
|
// check libawt_xawt.so
|
||||||
strcpy(libmawtpath, buf);
|
strcpy(libmawtpath, buf);
|
||||||
strcat(libmawtpath, motifstr);
|
strcat(libmawtpath, new_xawtstr);
|
||||||
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
if (::stat(libmawtpath, &statbuf) == 0) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user