problems with basic "Hello World" program
From: john smith (princetonharvard_at_charter.net)
Date: 02/25/05
- Next message: Mark Fisher: "Re: problems with basic "Hello World" program"
- Previous message: Oscar kind: "Re: problems using property files within servlets."
- Next in thread: Mark Fisher: "Re: problems with basic "Hello World" program"
- Reply: Mark Fisher: "Re: problems with basic "Hello World" program"
- Reply: Eric Sosman: "Re: problems with basic "Hello World" program"
- Reply: Daniel Tryba: "Re: problems with basic "Hello World" program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Feb 2005 14:12:22 -0800
I have a basic program where I compile the java code and then run it.
I can not seem to run the code for some reason.
1.) Here is my code
class HelloWorld
{
public static void main( String[] args)
{
System.out.print("This is Java");
}
}
2.) I then type in javac HelloWorld.java
and this works. I end up getting a HelloWorld.class.
3.) then I type in java HelloWorld and this does NOT work.
I get an error message:
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/java
Can someone please tell me what is wrong. I am really confused since I know
I am able to compile
ok, just cannot run the program.
Thanks for any help on this matter.
- Next message: Mark Fisher: "Re: problems with basic "Hello World" program"
- Previous message: Oscar kind: "Re: problems using property files within servlets."
- Next in thread: Mark Fisher: "Re: problems with basic "Hello World" program"
- Reply: Mark Fisher: "Re: problems with basic "Hello World" program"
- Reply: Eric Sosman: "Re: problems with basic "Hello World" program"
- Reply: Daniel Tryba: "Re: problems with basic "Hello World" program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|