This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Head First GoodDog code error

 
Dustin Eldridge
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to run this code from the book I get this error.

Here is my code

Here is the error

javac is not recogizable as an internal or external command, operable program or batch file.

funny I have compiled files from this same dir and computer just yesterday so I know the path is correct.

 
Walter Gabrielsen Iii
Ranch Hand
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you updated your Java version recently?

Java update can create new folders in the Java program directory for new versions. Such as "jdk1.6.0_25" folder inside the "Java" program folder.

Check in your system properties that your "path" and "classpath" variables, and the Java directory are pointing to the same folder.
 
Dustin Eldridge
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the funny part is I used javac on a old java file that I have already compiled and it worked today. So then I tried it on the GoodDog.java file and it came back with some errors in the code but it is working now. Dont have a clue what happened Friday because I have not changed anything. Oh well, thanks for your help.

Dustin
 
Dustin Eldridge
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this GoodDog code from HFJ book on page 82 really work?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code above won't compile because you forgot a " quote on line 17.

The error you had earlier ("javac is not recognized ...") doesn't have anything to do with the code. It just means that the operating system can't find the Java compiler, because your PATH environment variable isn't set up correctly.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic