Total n00b!

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Tittan
Posts: 2
Joined: Tue Aug 19, 2003 8:09 pm

Total n00b!

Post by Tittan »

Hi all.

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.
//*************************************************************************
//*** 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();
}
//===================================================================
}
It's in Norwegian, but the Java is still Java, isn't it ;)

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!
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

put ".;" as the first item in your classpath
or try searching for
"Exception in thread "main" java.lang.NoClassDefFoundError"
in the java forum, you are not the first one to get this ;)
Tittan
Posts: 2
Joined: Tue Aug 19, 2003 8:09 pm

Post by Tittan »

s_reynisson wrote:put ".;" as the first item in your classpath
or try searching for
"Exception in thread "main" java.lang.NoClassDefFoundError"
in the java forum,
Thanks a lot :)
you are not the first one to get this ;)
And, by the look of it, surely not the last either... :roll:
Duct tape is like the Force. It has a dark side, a light side, and it holds the universe together...
Post Reply