So just wasted about 5 minutes of my life :-P My fault, I may be a brunette but those blond roots find their way to resurface every now and again. I was getting a little bit frustrated because after I compiled the JAVA version of the “Hello World” program, I couldn’t get it to run via command prompt (even though it would run in my IDE, jGRASP).
Anyways, what I did is I saved my file I keep all the JAVA crap in directly into the C drive. Then I opened my command prompt box.
In the line:
C:\Users\My Name>
I typed: “cd \”
To change the directory to just the C drive. Then I typed: “dir” to list all the directories in the C drive. Then I rerouted the path to the file I keep all my JAVA crap in by typing “cd FILENAME”
Then I was able to see all the crap in the file by typing “dir” into the line that should now start like this:
C:\FILENAME>
I found my “Hello World” class and typed in “javac HelloWorld.java” to compile it; after receiving the error message, I realized that my blond roots had struck again :-P I already compiled and ran the file in the jGRASP IDE. So I didn’t need this step :-P...so then I typed in “java HelloWorld” to run the program.
![]() |
| Hello World! |
After successfully running my first program; I am starting to appreciate C++ a lot more, it is faster, more flexible and easier to learn. Anyways, now I just have to remember that I moved my file into my C drive and I should be alright ;-) Also, in the jGRASP I changed the file path where I am going to saving all my JAVA stuff.
I just finished editing my first assignment, using only the notepad and command prompt box - the way I was supposed to for the assignment, anyways here it is:
I just finished editing my first assignment, using only the notepad and command prompt box - the way I was supposed to for the assignment, anyways here it is:
![]() |
| Hello Teacher! |


No comments:
Post a Comment