jdk15 and window manager
Huang wen hui
hwh at gddsn.org.cn
Sat Oct 8 22:00:33 PDT 2005
Greg Lewis дµÀ:
>On Sat, Oct 08, 2005 at 08:53:08PM +0300, Panagiotis Astithas wrote:
>
>
>>Huang wen hui wrote:
>>
>>
>>>OK, using Option "-Dawt.toolkit=sun.awt.X11.XToolkit" really help that:)
>>>We should use X11 Toolkit by default.
>>>
>>>
>>I guess so:
>>
>>http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html
>>
>>
>
>You could try the attached patch (currently untested, but looks reasonable).
>
>
>
>------------------------------------------------------------------------
>
>$FreeBSD$
>
>--- ../../j2se/src/share/classes/java/awt/Toolkit.java 10 Jan 2005 07:40:41 -0000 1.2
>+++ ../../j2se/src/share/classes/java/awt/Toolkit.java 9 Oct 2005 04:11:13 -0000
>@@ -809,12 +809,11 @@
> try {
> String defaultToolkit;
>
>- /* XXXBSD: analyze and choose better one */
>- if (System.getProperty("os.name").equals("Linux")) {
>- defaultToolkit = "sun.awt.X11.XToolkit";
>+ if (System.getProperty("os.name").equals("SunOS")) {
>+ defaultToolkit = "sun.awt.motif.MToolkit";
> }
> else {
>- defaultToolkit = "sun.awt.motif.MToolkit";
>+ defaultToolkit = "sun.awt.X11.XToolkit";
> }
> nm = System.getProperty("awt.toolkit",
> defaultToolkit);
>
>
Need more a patch:
--- ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c.orig Sun Oct
9 12:31:14 2005
+++ ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c Sun Oct 9
12:34:47 2005
@@ -195,8 +195,7 @@
}
}
else {
-/* XXXBSD: decide which toolkit to use */
-#if defined(__linux)
+#if defined(__linux) || defined(__FreeBSD__)
/* Default AWT Toolkit on Linux is XAWT. */
strcpy(p, "/xawt/libmawt");
XAWT = 1;
--hwh
More information about the freebsd-java
mailing list