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

The X windows property WM_CLASS is set incorrectly in java 1.4.1_01

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 6
    • 1.4.0
    • client-libs
    • sparc
    • solaris_8

      When using xprop to look at the properties of a gui created with JDK 1.4.1_01 (And java 1.4) - the WM_CLASS gets set using . if the program is called with . (java sub.directory.program)

      This does not happen with java 1.3.X, the WM_CLASS is set with no . even if the program is within a subdirectory (package)

      The "." in the WM_CLASS prevents the user from setting X resources for Java applications. The reason it does not work is that "." is the delimiter character for X resources, so "pak.test.MyTest" cannot be a valid class name. For example, the resource rule "pak.test.MyTest*geometry" would be parsed as object "pak", sub-object "test", sub-object "MyTest", resource name "geometry" and not object "pak.test.MyTest", resource name "geometry". You can read about how X resources are interpreted in the Xlib Programming Manual (The Definitive Guides to the X Window System, Volume One), section 13.4.

      As an illustration of specifically how this Java 1.4 bug can cause problems, I
      have attached another test program called MyTest2 (the same test program you
      already have but not in a package) and a file "Xdefaults" containing two X
      resource lines. Add the X resource lines to your .Xdefaults and restart your
      window manager (or log out and back in). Then run (using Java 1.4) "java
      MyTest2" and "java pak.test.Mytest" and compare results. The resources I
      provided are supposed to make the window appear in the lower right corner of the
      screen, but it only works in MyTest2, which does not have "." in its WM_CLASS
      name.

            yan Yuri Nesterenko (Inactive)
            mhmiller Matt Miller (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: