Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help compiling Program" Watch "Help compiling Program" New topic

Help compiling Program

Al Cass

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
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

Joined: Mar 22, 2005
Posts: 42958
Welcome to JavaRanch.

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

javac -classpath .
I agree. Here's the link:
subject: Help compiling Program
It's not a secret anymore!