Programs Compile But Won't Run

I am developing programs in the SDK 1.4.2_10 environment and running the same version of the JRE on multiple computers. I have written several programs and turned them into .jar files, all of which run on my work computer, my home computer, and several colleagues computers.

The problem is there is one computer where programs won't run. The computer has the JRE and the SDK installed and at version 1.4.2_10. I've even tried setting up the PATH and CLASSPATH variables, compiling the code and the trouble computer and running it. The PC can compile just fine, but when I run it (either at the command prompt or through a .jar file), the program hangs. To be clear, there is no input statement without a prompt or any other error like that and even if there were, I would be aware from running it on other PC's. Does anyone have any ideas on what the problem can be?

[882 byte] By [redgrey85a] at [2007-10-2 18:25:26]
# 1
What happens when you type "java -version" at the commandline of that computer?If it responds, Java is probably installed correctly.
ChuckBinga at 2007-7-13 19:46:28 > top of Java-index,Desktop,Runtime Environment...
# 2
I get the standard response. I'm running Java 1.4.2_10 / 1.4.2_10 build 3. I also get this on my other terminals, so I don't think it's the installation. Any other ideas?
redgrey85a at 2007-7-13 19:46:28 > top of Java-index,Desktop,Runtime Environment...
# 3
Try compiling and running a :HelloWorld" class on that computer.
ChuckBinga at 2007-7-13 19:46:28 > top of Java-index,Desktop,Runtime Environment...
# 4

Okay, I wrote the world's simplest HelloWorld (just a output) and it compiled and ran fine. I also tried a more complex program that imported ArrayList, added Integers to the ArrayList, and then printed out the ArrayList and everything ran. And yet, when I try running the programs with swing components, they still don't run (but do compile). Any thoughts?

redgrey85a at 2007-7-13 19:46:28 > top of Java-index,Desktop,Runtime Environment...
# 5

Try this Swing HelloWorld class. It runs ok here. If it runs for you, then your other programs have problems, it's not Java or its installation. If it doesn't run, then something is wrong with Java's installation, or the machine configuration.

import javax.swing.*;

public class HelloWorldSwing

{

public static void main(String[] args)

{

javax.swing.SwingUtilities.invokeLater(new Runnable()

{

public void run()

{

createAndShowGUI();

}

});

}

private static void createAndShowGUI()

{

JFrame frame = new JFrame("HelloWorldSwing");

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

JLabel label = new JLabel("Hello World");

frame.getContentPane().add(label);

frame.pack();

frame.setVisible(true);

}

}

ChuckBinga at 2007-7-13 19:46:28 > top of Java-index,Desktop,Runtime Environment...
# 6

The code runs fine on my PC but not the troubled one. I will take a long hard look at the configuration on the other PC. Hit me back if you can think of anything particularly tricky I should be on the look out for (or if you can think of any way that I could have installed everything but the swing components right.) Thanks a ton either way.

redgrey85a at 2007-7-13 19:46:28 > top of Java-index,Desktop,Runtime Environment...