pirana6
Go Cougs!
+682|6261|Washington St.
decided to teach myself a programming language and settled on java

the first program i have is the one they teach everyone to start with:

Code:

public class HelloWorld {


    public static void main(String[] args)  {

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

        }


}
I compile in the command prompt:

javac HelloWorld.java

and it comes back just fine (creating the file: HelloWorld.class)

now I enter into the command prompt:

java HelloWorld

and get: "Error: Could not find or load main class HelloWorld"

...
help plox!
unnamednewbie13
Moderator
+2,053|6742|PNW

Programming subsection, maybe?
pirana6
Go Cougs!
+682|6261|Washington St.
whoops didn't see that
tazz.
oz.
+1,338|6145|Sydney | ♥

everything i write is a ramble and should not be taken seriously.... seriously.
pirana6
Go Cougs!
+682|6261|Washington St.
needed a ".;" at the beginning of my CLASSPATH environment variable

problem solved

Board footer

Privacy Policy - © 2024 Jeff Minard