I think I have bad installation

I recently downloaded the sdk for my computer. The problem is my first program won't work so I'm convinced it is a bad download for whatever reason.I am running the well known program "Hello World".

At the end of my path I have C:\j2sdk1.4.2_05\bin which has to be right because when I compile it it shows no errors. Then I try to execute the program by inputing java -classpath. This is when my computer specifies that java.exe has had an error by showing the error message pop up(seperate from the command prompt) and saying that it needs to close. I'm sure most of you are familiar with this. I just wanted to know what should I do. If I download it agian do I have to delete the old one since I will have one path for two programs? And can I even think about deleting it all since it it has so many programs and applications on my computer.What should I do?

[877 byte] By [Archimedes27] at [2007-9-30 17:05:58]
# 1
It seems more like an OS problem. Can you please also specify the OS/hardware config?
veenurs at 2007-7-6 13:25:48 > top of Java-index,Administration Tools,Sun Connection...
# 2

Change to the directory that contains HelloWorld.class. Then execute this command:

"C:\j2sdk1.4.2_05\bin\java -cp . HelloWorld"

Be sure that the command includes the period and the spaces around it.

If that works check the directories listed in the classpath (from left to right) for one that contains a copy of java.exe that isn't part of this version of Java. If you don't find one, then check the Registry (search for Javasoft) for an entry that's pointing to something not a part of this Java version.

ChuckBing at 2007-7-6 13:25:48 > top of Java-index,Administration Tools,Sun Connection...
# 3
Then what do I do with the information I find? By the way I have a dell and use windows xp.
Archimedes27 at 2007-7-6 13:25:48 > top of Java-index,Administration Tools,Sun Connection...
# 4
> Then what do I do with the information I find? By the> way I have a dell and use windows xp.This reply is unclear. What did you do and what were the results? Please be specific and detailed.
ChuckBing at 2007-7-6 13:25:48 > top of Java-index,Administration Tools,Sun Connection...
# 5

I went to the this site and clicked "J2SE 1.4.2 SDK" under the popular downloads section on the right.I then clicked on "J2SE v 1.4.2_05 SDK " under the netbeans download. After downloading it into my hard drive I typed in this program

public class Hello

{

public static void main (String[] args)

{

System.out.println("Hello World");

}

}

After doing this I compiled it and tried to use java.exe by typing in java -classpath in the command prompt but got an error from the computer saying

" java.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

This was seperate from the command prompt so I'm guessing there is a problem with the way my computer is interacting with the downloaded java software. My path is right because it compiled without any errors.How should I fix java.exe.?

Archimedes27 at 2007-7-6 13:25:48 > top of Java-index,Administration Tools,Sun Connection...
# 6
Once I find the java.exe folder in the registry I just want to know what to do then. Am I supposed to delete something or will I find out its not there or in the wrong place?
Archimedes27 at 2007-7-6 13:25:49 > top of Java-index,Administration Tools,Sun Connection...
# 7
Did you do exactly the following? What was th result?Change to the directory that contains HelloWorld.class. Then execute this command:"C:\j2sdk1.4.2_05\bin\java -cp . HelloWorld"Be sure that the command includes the period and the spaces around it.
ChuckBing at 2007-7-6 13:25:49 > top of Java-index,Administration Tools,Sun Connection...