|
![]() |
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
That sounds correct. Assuming you have opened a Windows/DOS command prompt, try the following two instructions:-Chris Poston wrote:. . . Google searches said to change the directory to where the zoo.java file would be . . .
You can use a name different from java. Whenever you open the command prompt, use the second line to take you to your folder. When you have hundreds of classes in it, you can always create more folders and move things. Now use the dir command to find what is in that folder. Move your Zoo.java file into that location and use the following two commands:-mkdir java
cd java
Note only one command requires an extension. Tell us what happens.javac Zoo.java
java Zoo
Chris Poston wrote:Ritchie/Junilu, i tried entering these in the DOS Command Prompt (I assumed that's what you meant). I didn't have any luck running the $ lines of code with/without the $ here either. Google searches said to change the directory to where the zoo.java file would be but I didn't have any luck with this either. I appreciate the help and I'll try to reply quicker this time. Being Friday, I should be free to respond quicker later today!
Campbell Ritchie wrote:
That sounds correct. Assuming you have opened a Windows/DOS command prompt, try the following two instructions:-Chris Poston wrote:. . . Google searches said to change the directory to where the zoo.java file would be . . .
You can use a name different from java. Whenever you open the command prompt, use the second line to take you to your folder. When you have hundreds of classes in it, you can always create more folders and move things. Now use the dir command to find what is in that folder. Move your Zoo.java file into that location and use the following two commands:-mkdir java
cd javaNote only one command requires an extension. Tell us what happens.javac Zoo.java
java Zoo
PS: You would use the same instructions on a Linux/Unix/OS X terminal.
javac' is not recognized as an internal or external command, operable program or batch file.
Norman Radder wrote:
javac' is not recognized as an internal or external command, operable program or batch file.
Take a look at the Common Problems page: http://docs.oracle.com/javase/tutorial/getStarted/problems/index.html
That message is from the OS. You need to tell the OS where the javac.exe file is located.
Another solution is to use the full path to the javac.exe file:
C:\Program Files\Java\jdk1.8.0_60\bin\javac.exe -cp . -Xlint -Xdiags:verbose TestCode23.java
Ron McLeod wrote:Try wrapping the path in quotes:
"C:\Program Files\Java\jdk1.8.0_73\bin\javac" -cp . -Xlint -Xdiags:verbose Zoo.java
(or use the equivalent DOS path: C:\PROGRA~1\Java\jdk1.8.0_73\bin\javac )
Chris Poston wrote:Just as a side note when running the NetBeans created Zoo.java file it gives and Error: Could not find or load main class Zoo.
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
|