| From | Sent On | Attachments |
|---|---|---|
| Chris Hegarty | Nov 9, 2011 4:25 am | |
| Artem Ananiev | Nov 9, 2011 5:16 am | |
| Alan Bateman | Nov 9, 2011 6:20 am | |
| Phil Race | Nov 9, 2011 9:45 am | |
| David Holmes | Nov 10, 2011 8:59 pm | |
| David Holmes | Nov 10, 2011 9:05 pm | |
| Chris Hegarty | Nov 11, 2011 3:40 am | |
| Phil Race | Nov 11, 2011 9:31 am | |
| Chris Hegarty | Jan 26, 2012 12:35 pm |
| Subject: | Re: <AWT Dev> Code Review 7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be colocated with libawt | |
|---|---|---|
| From: | David Holmes (davi...@oracle.com) | |
| Date: | Nov 10, 2011 8:59:42 pm | |
| List: | net.java.openjdk.awt-dev | |
Chris,
I just discovered that there is an additional change needed for JAVASE_EMBEDDED. On the JDK side we also have a check to try and determine if this is a headless or headful JRE, because a true headless-JRE requires the special HToolkit. That code checks for the existence of lib/<arch>/xawt to make that decision and so presently all JRE's appear to headless JREs :(
Here's a fix:
diff -r 830d2e46023a src/solaris/native/java/lang/java_props_md.c --- a/src/solaris/native/java/lang/java_props_md.c +++ b/src/solaris/native/java/lang/java_props_md.c @@ -325,8 +325,8 @@ realpath((char *)dlinfo.dli_fname, buf); len = strlen(buf); p = strrchr(buf, '/'); - /* Default AWT Toolkit on Linux and Solaris is XAWT. */ - strncpy(p, "/xawt/", MAXPATHLEN-len-1); + /* Default AWT Toolkit on Linux and Solaris is libawt_xawt. */ + 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 */
Sorry I didn't think of this earlier.
Thanks, David
On 9/11/2011 10:28 PM, Chris Hegarty wrote:
Hi,
CR 7110002 proposes to rename the unix version of the awt toolkit libraries to allow them reside in the same directory as libawt. xawt/libmawt.so -> libawt_xawt.so headless/libmawt.so -> libawt_headless.so
The proposed new library names are prefixed with 'libawt' since they are subcomponents of libawt and this will make them more easily recognizably as such. But this is not necessarily a requirement, just that they are unique and can be colocated with libawt.
This CR is part of the modularity effort. A future requirement of the jigsaw prototype is to treat native JDK implementation libraries as it would any user module installed in a module library. That is, native libraries should reside within the lib directory of the installed module. In the module library then AWT's libraries might be located in somewhere like modules/sun.desktop/8.0/lib.
See discussion on the awt-dev mailing list for further context: http://mail.openjdk.java.net/pipermail/awt-dev/2011-April/001666.html
Webrev: http://cr.openjdk.java.net/~chegar/7110002/webrev.00/
Thanks, -Chris





