-
Bug
-
Resolution: Incomplete
-
P3
-
7, 7u4
-
x86
-
linux_redhat_5.0
FULL PRODUCT VERSION :
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux ravel 2.6.32-220.4.1.el6.x86_64 #1 SMP Thu Jan 19 14:50:54 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
We have an application of moderate complexity that we have ported to Java 1.7. It runs flawlessly (with regard to the current issue) on Windows, Solaris and Ubuntu.
We try to run it on Red Hat Enterprise Linux 6 with Java 1.7.0_04 (tried also with 1.7.0_03) and we have a blocking problem.
First, we have a login dialog with a sensible default (user name filled, no password) so we can log in by just clicking on the OK button, but we observe that 3 times out of 4, we cannot enter the password: no caret, nothing can be typed.
When we can see the caret in the password field, we can also edit text in text fields and text areas. Otherwise, these fields act as not being enabled: when we click on them, no caret appears and keystrokes are ignored.
It looks like the focus system is messed up.
So I compiled the Java class given at the http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html page (FocusEventDemo.java).
Compiled with Java 1.6.0_30 (32bit) on Windows 7.
Then I transfered the class files to the RHEL6 system and run the program with Telnet (PuTTY) with an X-Window server (Xming-mesa-6-9-0-31, but this has been reproduced with the Cygwin X11 server too) with Java 1.7.0_04 (and _03).
It shows the same issue: the text field is read-only, there is no visible caret that would go from component to component, no information is displayed in the text area.
I also tried some other applications:
- yEd from http://www.yworks.com/en/products_yed_about.html
- RText from http://fifesoft.com/rtext/
- the Swing demo of MigLayout: http://www.miglayout.com/
All of them run without problem with Java 1.6.0_30 on this system, and yEd and RText show the same issue with Java 1.7.0_04: non-editable text fields in the main window or in the preference dialogs, etc.
Note there is another problem, perhaps related: all the global shortcut keys, from Alt+H to open the Help menu to Ctrl+key to open some dialog, don't work.
The Swing demo of MigLayout is different and works flawlessly. Including the shortcut key Ctrl+B running a benchmark.
And it works whatever the look & feel I select to run it (Metal, Nimbus, some JGoodies ones).
I have run it from the jar (perhaps gotten from the JNLP link on the given page) and from the class file compiled with Java 1.6 (the source code is in the sources of the library).
I tried to hack the FocusEventDemo.java to isolate the problem, without success:
- I removed all the focus listeners;
- I tried another layout manager (FlowLayout);
- I removed the look & feel change;
- I tried other L&F, and put the change in the EDT.
In all cases, the focus cannot be gotten.
Out of resources and ideas, I open this bug, hoping it can be solved quickly. I have not found a similar bug, although I saw several bug opened against Linux and keyboard management.
If you have any workaround or fix at application level (like making a custom FocusManager or similar), I would be happy to know it.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Go to http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html
Download the demo code: http://docs.oracle.com/javase/tutorial/uiswing/examples/events/FocusEventDemoProject/src/events/FocusEventDemo.java
Compile it.
I compiled it on Windows with Java 1.6.0_30, to be able to test it works with this version, but I also tried classes compiled with Java 1.7.0_04.
Transfer the class files to a RHEL6 system. Set up a X-Window server on the Windows computer, run a telnet session (with SSH) with the proper X11 settings, and run the class, like:
/usr/java/jdk1.7.0_04/bin/java FocusEventDemo
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Swing frame is displayed, focus events are displayed in the text area, a blinking caret is seen in the text field, we can change focus by hitting the Tab key.
This is seen when running on Windows.
ACTUAL -
The Swing frame is displayed, we have the text cursor over the text field, but we don't see the caret even when clicking on it, and no focus events are displayed in the text area.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages. Just wrong behavior.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Official Java demo at http://docs.oracle.com/javase/tutorial/uiswing/examples/events/FocusEventDemoProject/src/events/FocusEventDemo.java
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None found yet. :-(
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux ravel 2.6.32-220.4.1.el6.x86_64 #1 SMP Thu Jan 19 14:50:54 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
We have an application of moderate complexity that we have ported to Java 1.7. It runs flawlessly (with regard to the current issue) on Windows, Solaris and Ubuntu.
We try to run it on Red Hat Enterprise Linux 6 with Java 1.7.0_04 (tried also with 1.7.0_03) and we have a blocking problem.
First, we have a login dialog with a sensible default (user name filled, no password) so we can log in by just clicking on the OK button, but we observe that 3 times out of 4, we cannot enter the password: no caret, nothing can be typed.
When we can see the caret in the password field, we can also edit text in text fields and text areas. Otherwise, these fields act as not being enabled: when we click on them, no caret appears and keystrokes are ignored.
It looks like the focus system is messed up.
So I compiled the Java class given at the http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html page (FocusEventDemo.java).
Compiled with Java 1.6.0_30 (32bit) on Windows 7.
Then I transfered the class files to the RHEL6 system and run the program with Telnet (PuTTY) with an X-Window server (Xming-mesa-6-9-0-31, but this has been reproduced with the Cygwin X11 server too) with Java 1.7.0_04 (and _03).
It shows the same issue: the text field is read-only, there is no visible caret that would go from component to component, no information is displayed in the text area.
I also tried some other applications:
- yEd from http://www.yworks.com/en/products_yed_about.html
- RText from http://fifesoft.com/rtext/
- the Swing demo of MigLayout: http://www.miglayout.com/
All of them run without problem with Java 1.6.0_30 on this system, and yEd and RText show the same issue with Java 1.7.0_04: non-editable text fields in the main window or in the preference dialogs, etc.
Note there is another problem, perhaps related: all the global shortcut keys, from Alt+H to open the Help menu to Ctrl+key to open some dialog, don't work.
The Swing demo of MigLayout is different and works flawlessly. Including the shortcut key Ctrl+B running a benchmark.
And it works whatever the look & feel I select to run it (Metal, Nimbus, some JGoodies ones).
I have run it from the jar (perhaps gotten from the JNLP link on the given page) and from the class file compiled with Java 1.6 (the source code is in the sources of the library).
I tried to hack the FocusEventDemo.java to isolate the problem, without success:
- I removed all the focus listeners;
- I tried another layout manager (FlowLayout);
- I removed the look & feel change;
- I tried other L&F, and put the change in the EDT.
In all cases, the focus cannot be gotten.
Out of resources and ideas, I open this bug, hoping it can be solved quickly. I have not found a similar bug, although I saw several bug opened against Linux and keyboard management.
If you have any workaround or fix at application level (like making a custom FocusManager or similar), I would be happy to know it.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Go to http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html
Download the demo code: http://docs.oracle.com/javase/tutorial/uiswing/examples/events/FocusEventDemoProject/src/events/FocusEventDemo.java
Compile it.
I compiled it on Windows with Java 1.6.0_30, to be able to test it works with this version, but I also tried classes compiled with Java 1.7.0_04.
Transfer the class files to a RHEL6 system. Set up a X-Window server on the Windows computer, run a telnet session (with SSH) with the proper X11 settings, and run the class, like:
/usr/java/jdk1.7.0_04/bin/java FocusEventDemo
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Swing frame is displayed, focus events are displayed in the text area, a blinking caret is seen in the text field, we can change focus by hitting the Tab key.
This is seen when running on Windows.
ACTUAL -
The Swing frame is displayed, we have the text cursor over the text field, but we don't see the caret even when clicking on it, and no focus events are displayed in the text area.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages. Just wrong behavior.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Official Java demo at http://docs.oracle.com/javase/tutorial/uiswing/examples/events/FocusEventDemoProject/src/events/FocusEventDemo.java
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None found yet. :-(