Re: Path problem in a jar
Roedy Green wrote:
Yeah typo error.
I found something about getressource()
Do you mean getResource(), in java.lang.Class?
(Note the one Upper Case, one 's').
If not, you may need to link to some JavaDocs for it.
..but I'm trying to find more about it.
Here are the JavaDocs for Class.getResource()
<http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResource(java.lang.String
)>
see http://mindprod.com/jgloss/image.html
and http://mindprod.com/jgloss/resource.html
(To the OP - read those, Roedy's pages usually
contain a swathe of good tips) ..but..
The background might help you crack your problem.
..I am gonna' take a WAG that we already know enough.
I suggest this code should obtain an URL to the DB..
// important to put the leading '/'!
URL theDB = anObject.getClass().
getResource("/Data/Database/MyDataBase.mdb")
HTH
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200708/1