File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes PLS help me about file access!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "PLS help me about file access!!" Watch "PLS help me about file access!!" New topic
Author

PLS help me about file access!!

sparkle zou
Greenhorn

Joined: Dec 02, 2002
Posts: 7
now the file struct is like the bellow:
<root>/db
db.db
<root>/server
RemoteDataImp.java
how to write the code in RemoteDataImp.java to access file db.db??
the code writen bellow is wrong!
dataWrapper = new Data("../db/db.db");
Brian Blignaut
Ranch Hand

Joined: Jan 08, 2003
Posts: 61
Is that your jar structure? Your db.db file does not need to be in your jar.
sparkle zou
Greenhorn

Joined: Dec 02, 2002
Posts: 7
Not in Jar;just in source code~!
sparkle zou
Greenhorn

Joined: Dec 02, 2002
Posts: 7
I get it!
use
dataWrapper = new Data("..//db//db.db");
instead of
dataWrapper = new Data("../db/db.db");
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: PLS help me about file access!!