The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Works on debug mode but not on run mode

Dear Java Programmers:

During my life I have programed in several languages all of them compiled or interpreted.
Now I am doing in Java which I use as a type of C, but I have a lot of problems with transporting the code from one machine to another, in fact I am asking for help, because I am working with two machines one foot apart and my code runs perfectly in one but not in the other.
I am at lost on how to solve this problem, as it supposed that the code should run in any machine as my C code works on any machine C compiler.
The details follow:

I have written some small keyboard driven java applications.
They work OK on Eclipse and Netbeans on Centos 4.8 with jdk1.5.0_09.
But, on Centos 5.4 with any Eclipse, Netbeans and java they ignore the key
pressed when they run, but work OK under debug.
I do not know whether it is pertinent but the Centos 4.8 machine has a PS2 keyboard plug and the Centos 5.4 one an usb one.
I know that I was very silly of me to use Java in something in which it
does not have any particular advantage over C, but now it is too late and I need
urgent help, so any clue would be greatly appreciated.
As I said before the code is not the problem as it works in one machine and it is a very usual piece of code, but just in case the pertinent parts of it follow: