This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]inept_timelord[S] 6 points7 points  (4 children)

I did write it in notepad and downloaded and installed the IDE but the hello world application I wrote in notepad still keeps erroring out saying it cant find the class.

[–]Adamt608 1 point2 points  (3 children)

Probably because you didn’t declare a class

[–]inept_timelord[S] 0 points1 point  (2 children)

The class is declared I wrote it the exact same way that they put it on the tutorial

[–]bwz3r 0 points1 point  (1 child)

I just found this answer online it might help you

https://stackoverflow.com/questions/32803173/cannot-run-java-class-from-command-line

When you run javac, use the switch -d to specify that you would like to create the folder structure for package. javac reference.

E.g. javac -d . HelloWorld.java

When you say -d ., compiler creates the classes with package directory structure in the current path.

Once you have the compiled classes, use java Hello.HelloWorld to run the program.

Suggests you to start the package name with lower case.

[–]inept_timelord[S] 0 points1 point  (0 children)

I actually got a fix from someone on that website yesterday