Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help compiling Program

 
Al Cass
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a program from the book head first java
when i try to compile this,the compiler tells me that the class SimpleDotCom should be declared in a file Called SImpleDotCom.java
Ok
So When i put the class in its own file the compiler then tells me that it can not find the symbol for this line of code
SimpleDotCom dot = new SimpleDotCom();


Here is my Code


I copied word for word from the book. still no luck
Any suggestions
Thank you
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

If both files/classes are in the same directory, try

javac -classpath . SimpleDotComTestDrive.java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic