my dog learned polymorphism
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes package problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "package problem" Watch "package problem" New topic

package problem

sam cen

Joined: Nov 10, 2002
Posts: 5
I got a problem about the package usage. I set all my java sourse code
with package suncerity.db;
I also put all the files in c:\..\java\start\suncerity\db\ directory,
and set the class path to c:\..\java\start;
The problem is that i have to move the db.db into c:\..\java\start\ directory
from c:\..\java\start\suncerity\db\ otherwirse when i run the progame it can't find the db.db file.
anyone know the reason, by the way, do we really need to set package for this project.
Matt Ghiold
Ranch Hand

Joined: Feb 24, 2002
Posts: 213
You should definately set up packages for this project, without seeing code I am shooting in the dark, but my guess is your looking for your db.db file in your current file folder, but when you set up your package structure to java the root folder is the top of the package.
If this doesn't make sense, feel free to put up your db access code and i'd be glad to help out more.

-Matt<br /> SCJP2<br /> SCJD
I agree. Here's the link:
subject: package problem
jQuery in Action, 3rd edition