1
I have a very weird problem with a Java GUI that I've built at work. It is so weird I don't even know where to start to look for help!!
We have a standalone system at an offsite location consisting of a Windows PC, running XP, and a SuSE Linux machine. I built a Java GUI that runs some bash scripts on the Linux machine. The GUI is started from the Windows machine because the user is not a Linux person. The GUI was built to replace scripts that presented the user with command line prompts for providing inputs to the main processing scripts.
The user clicks an icon on the windows desktop which runs a DOS batch (*.bat) file. The batch file uses plink, with a stored PuTTY session, to connect to the Linux machine and to execute a "java -jar XXX.jar" command to start the GUI. The GUI displays on the Windows PC due to Cygwin/X X Server running on the windows PC.
Okay. Now for the weirdness. If I leave the GUI in the location where it initially pops up, everything is fine. If I move the GUI, then the pulldown menus (dropdown combo boxes and menubar pulldowns) no longer work properly. And ONLY the pulldown menus. Everything else works fine (pushbuttons, text fields, ...). If I move the GUI back to its original location, everything works fine. If I click, hold and drag the mouse cursor over to where the GUI initially popped up (leaving the GUI where I moved it) the pulldown menus work properly.
At first I thought I had a problem with the way I initialized the pull down menus but I'm not so sure anymore. I'm wondering if there is something weird going on with the windows <-> putty <-> linux or the Xwin setups.
Contributing to not being able to solve this is that I cannot replicate this behavior at work. Unfortunately we don't have an exact replica of the offsite system; I'm testing/building this GUI on a XP to Debian Linux machine.
As anybody seen anything like this? Any suggestion as to what might be going on here?
Thanks times a billion
Bill
Thanks ... I didn't think of that-using plink to run the scripts instead of the GUI :) Just curious, why is running Java through X redirection a bad idea? – Bill Doss – 2012-01-27T14:54:55.367
I reworked my source code to run on windows and use plink to execute the commands on the linux machine. Because this works, I will consider this question "solved". Thanks!!!!!!!! – Bill Doss – 2012-02-08T00:36:09.363
(Sorry, somehow the notification for your first comment is ignored.) It's not a good idea because it's unnecessary overhead and is really slow and unstable. – billc.cn – 2012-02-08T10:33:54.037