I just started learning Java programming today, and I am very eager to get this right. Our teacher told us to get TextPad and j2sdk1.4.2, so I did. Installed and I though all was well.
Then I got my book out, and typed in the first example I could find. It wouldn't work, so I tried again and again and again untill I felt sick of trying to get this right. I went online and downloaded the teachers examples, and opened the first program.
It's in Norwegian, but the Java is still Java, isn't it//*************************************************************************
//*** EksL0101 ***
//*************************************************************************
//*** Det første Java-program. Programmet skriver tre linjer i DOS- ***
//*** vinduet, den første og den siste er blanke. ***
//*************************************************************************
public class EksL0101
{
//======================================================================
//=== main-metoden starter utførelsen av Java-programmet ===
//======================================================================
public static void main( String args[] )
{
System.out.println();
System.out.println( "Velkommen til Grunnkurs i programmering!" );
System.out.println();
}
//===================================================================
}
Pressing CTRL+1 is ok, but CTRL+2 sould, if I got it right, open a MS-Dos prompt and show the line "Velkommen til Grunnkurs i programmering!" but all I get is: Exception in thread "main" java.lang.NoClassDefFoundError: EksL0101 Press a key to continue... and that's it :p
So, since I saw this little bit of code work during class today, I guess I've set up TextPad wrong in some way, but I can't figure out what...
Any help at all would be great!