File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark ""Bruce Eckel" class file" Watch ""Bruce Eckel" class file" New topic

"Bruce Eckel" class file

mamta jindal

Joined: Jun 29, 2006
Posts: 15
hi dear frnds
actually i have a book of bruce eckal (jdk1.4). but programmes of that book are not runing in my pc. i think his class file is missing. can anybody help me for this book every program is start with

import com.bruceeckel.simpletest.*;

import file.if anybody knows about that plz tell me.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Hi Mamta, sorry you are having some issues with the files.

Let me see if I can help.

1. An "import" statement in Java is not necessarily importing a "file" it is importing a defined class in some package. So in the case of

import com.bruceeckel.simpletest.*;

you are allowing the code you are about to write for the class to be able to use any class defined in the com.bruceeckel.simpletest package. The "*" is what says all classes in that package. A package strucutre will actually follow a directory path, so if your root source directory is c:\mysource. Then from "mysource" you will find \com\bruceeckel\simpletest

When compiling, you need to compile from the mysource directory and not from any of its subdirectories. When you compile, is when you create the class files. This occurs when you run "javac" without the quotes on the "mysource" directory. This is also the directory that you will use "java" to run your "program" passing it the class name of the class that has your "main" method.

So in order to run them on your machine you will need to compile the classes using javac.

Good Luck


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Chiok Jarse

Joined: Dec 29, 2005
Posts: 13

The zip file contains the code.
marc weber

Joined: Aug 31, 2004
Posts: 11343

And here are the instructions...

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: "Bruce Eckel" class file
It's not a secret anymore!