• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Bruce Eckel" class file

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 that.in this book every program is start with

import com.bruceeckel.simpletest.*;

import file.if anybody knows about that plz tell me.
thanks
mamta
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

Mark
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.mindviewinc.com/downloads/TIJ-3rd-edition4.0.zip

The zip file contains the code.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And here are the instructions...

http://mindview.net/Books/TIJ/#SourceCode
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic