aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordholmes <none@none>2011-11-16 20:38:24 -0500
committerdholmes <none@none>2011-11-16 20:38:24 -0500
commitded75f04d4b761a953ee1ca67b25dbdf2ccd1968 (patch)
treeea2a90e62d893013156f5b10ff799c5dde10d88d
parentba9e51beb715c2bcda6c2fae2fa6e9d0b964cc1d (diff)
7110017: is_headless_jre should be updated to reflect the new location of awt toolkit libraries
Reviewed-by: dholmes, dsamersoff Contributed-by: Chris Hegarty <chris.hegarty@oracle.com>
-rw-r--r--src/os/bsd/vm/os_bsd.cpp11
-rw-r--r--src/os/linux/vm/os_linux.cpp11
-rw-r--r--src/os/solaris/vm/os_solaris.cpp11
3 files changed, 21 insertions, 12 deletions
diff --git a/src/os/bsd/vm/os_bsd.cpp b/src/os/bsd/vm/os_bsd.cpp
index 2a3faa064..fd52f27ae 100644
--- a/src/os/bsd/vm/os_bsd.cpp
+++ b/src/os/bsd/vm/os_bsd.cpp
@@ -5778,15 +5778,18 @@ int os::fork_and_exec(char* cmd) {
// 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
//
+// Since JDK8 xawt/libmawt.so was moved into the same directory
+// as libawt.so, and renamed libawt_xawt.so
+//
bool os::is_headless_jre() {
struct stat statbuf;
char buf[MAXPATHLEN];
char libmawtpath[MAXPATHLEN];
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;
// Get path to libjvm.so
@@ -5807,9 +5810,9 @@ bool os::is_headless_jre() {
strcat(libmawtpath, xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
- // check motif21/libmawt.so
+ // check libawt_xawt.so
strcpy(libmawtpath, buf);
- strcat(libmawtpath, motifstr);
+ strcat(libmawtpath, new_xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
return true;
diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
index 3bf103984..3aba51a77 100644
--- a/src/os/linux/vm/os_linux.cpp
+++ b/src/os/linux/vm/os_linux.cpp
@@ -5425,15 +5425,18 @@ int os::fork_and_exec(char* cmd) {
// 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
//
+// Since JDK8 xawt/libmawt.so was moved into the same directory
+// as libawt.so, and renamed libawt_xawt.so
+//
bool os::is_headless_jre() {
struct stat statbuf;
char buf[MAXPATHLEN];
char libmawtpath[MAXPATHLEN];
const char *xawtstr = "/xawt/libmawt.so";
- const char *motifstr = "/motif21/libmawt.so";
+ const char *new_xawtstr = "/libawt_xawt.so";
char *p;
// Get path to libjvm.so
@@ -5454,9 +5457,9 @@ bool os::is_headless_jre() {
strcat(libmawtpath, xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
- // check motif21/libmawt.so
+ // check libawt_xawt.so
strcpy(libmawtpath, buf);
- strcat(libmawtpath, motifstr);
+ strcat(libmawtpath, new_xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
return true;
diff --git a/src/os/solaris/vm/os_solaris.cpp b/src/os/solaris/vm/os_solaris.cpp
index 92664d665..de9f88913 100644
--- a/src/os/solaris/vm/os_solaris.cpp
+++ b/src/os/solaris/vm/os_solaris.cpp
@@ -6311,15 +6311,18 @@ int os::fork_and_exec(char* cmd) {
// 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
//
+// Since JDK8 xawt/libmawt.so was moved into the same directory
+// as libawt.so, and renamed libawt_xawt.so
+//
bool os::is_headless_jre() {
struct stat statbuf;
char buf[MAXPATHLEN];
char libmawtpath[MAXPATHLEN];
const char *xawtstr = "/xawt/libmawt.so";
- const char *motifstr = "/motif21/libmawt.so";
+ const char *new_xawtstr = "/libawt_xawt.so";
char *p;
// Get path to libjvm.so
@@ -6340,9 +6343,9 @@ bool os::is_headless_jre() {
strcat(libmawtpath, xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
- // check motif21/libmawt.so
+ // check libawt_xawt.so
strcpy(libmawtpath, buf);
- strcat(libmawtpath, motifstr);
+ strcat(libmawtpath, new_xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
return true;