Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6996291

command line selection of MToolkit by -Dawt.toolkit=sun.awt.motif.MToolkit fails from jdk7 b21 on

    Details

    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic, x86, sparc
    • OS:
      linux, linux_ubuntu, solaris, solaris_10
    • Verification:
      Verified

      Description

      The problem may actually due to some security related changes since if set AWT_TOOLKIT environment variable to MToolkit, MToolkit works fine.

      The source for the test: TestCursor.java is attached with this bug.

      Here are detailed failure message:

      For jdk7 b21:
      /java/re/jdk/7/promoted/all/b21/binaries/solaris-i586/bin/java -Dawt.toolkit=sun.awt.motif.MToolkit TestCursor
      Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.awt.motif.MToolkit.init(Ljava/lang/String;)V
              at sun.awt.motif.MToolkit.init(Native Method)
              at sun.awt.motif.MToolkit.<init>(MToolkit.java:152)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:539)
              at java.lang.Class.newInstance0(Class.java:373)
              at java.lang.Class.newInstance(Class.java:326)
              at java.awt.Toolkit$2.run(Toolkit.java:876)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:856)
              at java.awt.Window.getToolkit(Window.java:1207)
              at java.awt.Window.init(Window.java:401)
              at java.awt.Window.<init>(Window.java:439)
              at java.awt.Frame.<init>(Frame.java:420)
              at javax.swing.JFrame.<init>(JFrame.java:225)
              at TestCursor.main(TestCursor.java:7)

      For jdk7 b20:
      /java/re/jdk/7/promoted/all/b20/binaries/solaris-i586/bin/java -Dawt.toolkit=sun.awt.motif.MToolkit TestCursor
      it runs fine.

      For jdk7 b116, the failure message is the same as in jdk7 b21.
      /java/re/jdk/7/promoted/all/b116/binaries/solaris-i586/bin/java -Dawt.toolkit=sun.awt.motif.MToolkit TestCursor
      Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.awt.X11FontManager.setNativeFontPath(Ljava/lang/String;)V
              at sun.awt.X11FontManager.setNativeFontPath(Native Method)
              at sun.awt.X11FontManager.setNativeFontPath(X11FontManager.java:733)
              at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:128)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:186)
              at java.awt.Toolkit$2.run(Toolkit.java:863)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:855)
              at java.awt.Window.getToolkit(Window.java:1311)
              at java.awt.Window.init(Window.java:497)
              at java.awt.Window.<init>(Window.java:533)
              at java.awt.Frame.<init>(Frame.java:420)
              at javax.swing.JFrame.<init>(JFrame.java:224)
              at TestCursor.main(TestCursor.java:7)


      if set environment variable and run MToolkit, it is fine:
       AWT_TOOLKIT=MToolkit
       export AWT_TOOLKIT
      echo $AWT_TOOLKIT
      MToolkit
      bash-3.00$ /java/re/jdk/7/promoted/all/b116/binaries/solaris-i586/bin/java TestCursor
      bash-3.00$ /java/re/jdk/7/promoted/all/b21/binaries/solaris-i586/bin/java TestCursor
      bash-3.00$ echo $AWT_TOOLKIT
      MToolkit
      bash-3.00$ /java/re/jdk/7/promoted/all/b20/binaries/solaris-i586/bin/java TestCursor

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                yicao Yinhe Cao (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: