--- old/src/java.base/unix/native/libjava/java_props_md.c Wed Jul 13 23:10:44 2016 +++ new/src/java.base/unix/native/libjava/java_props_md.c Wed Jul 13 23:10:42 2016 @@ -68,11 +68,6 @@ #endif #endif /* !_ALLBSD_SOURCE */ -#ifdef JAVASE_EMBEDDED -#include -#include -#endif - /* Take an array of string pairs (map of key->value) and a string (key). * Examine each pair in the map to see if the first string (key) matches the * string. If so, store the second string of the pair (value) in the value and @@ -350,36 +345,6 @@ return 1; } -#ifdef JAVASE_EMBEDDED -/* Determine the default embedded toolkit based on whether libawt_xawt - * exists in the JRE. This can still be overridden by -Dawt.toolkit=XXX - */ -static char* getEmbeddedToolkit() { - Dl_info dlinfo; - char buf[MAXPATHLEN]; - int32_t len; - char *p; - struct stat statbuf; - - /* Get address of this library and the directory containing it. */ - dladdr((void *)getEmbeddedToolkit, &dlinfo); - realpath((char *)dlinfo.dli_fname, buf); - len = strlen(buf); - p = strrchr(buf, '/'); - /* Default AWT Toolkit on Linux and Solaris is XAWT (libawt_xawt.so). */ - strncpy(p, "/libawt_xawt.so", MAXPATHLEN-len-1); - /* Check if it exists */ - if (stat(buf, &statbuf) == -1 && errno == ENOENT) { - /* No - this is a reduced-headless-jre so use special HToolkit */ - return "sun.awt.HToolkit"; - } - else { - /* Yes - this is a headful JRE so fallback to SE defaults */ - return NULL; - } -} -#endif - /* This function gets called very early, before VM_CALLS are setup. * Do not use any of the VM_CALLS entries!!! */ @@ -424,10 +389,6 @@ sprops.awt_headless = isInAquaSession() ? NULL : "true"; #else sprops.graphics_env = "sun.awt.X11GraphicsEnvironment"; -#ifdef JAVASE_EMBEDDED - sprops.awt_toolkit = getEmbeddedToolkit(); - if (sprops.awt_toolkit == NULL) // default as below -#endif sprops.awt_toolkit = "sun.awt.X11.XToolkit"; #endif