• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help compiling Program

 
Al Cass
Greenhorn
Posts: 1
  • 0
  • 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
Pie
Posts: 42966
73
  • 0
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic