aboutsummaryrefslogtreecommitdiff
path: root/src/os/solaris/vm/os_solaris.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/solaris/vm/os_solaris.cpp')
-rw-r--r--src/os/solaris/vm/os_solaris.cpp11
1 files changed, 7 insertions, 4 deletions
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;