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]

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?
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);
}
}