Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Help compiling Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help compiling Program" Watch "Help compiling Program" New topic
Author

Help compiling Program

Al Cass
Greenhorn

Joined: May 28, 2007
Posts: 1
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
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
Welcome to JavaRanch.

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

javac -classpath . SimpleDotComTestDrive.java


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help compiling Program
 
Similar Threads
i am not able to get out put of this program
Problem with Chapter 5 - SimpleDotCom
Test class cannot find other class
HFJ SimpleDotCom problems
Head first Java; simpledotcom problems...