*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How to specify a path of a certain file? 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 "How to specify a path of a certain file?" Watch "How to specify a path of a certain file?" New topic
Author

How to specify a path of a certain file?

Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
Hi,
I have some gif files as icons, But how can I specify the path to the file?
I put all the icons in a folder named icons, it is in suncertify folder.
I tried this way,
it can work under windows OS, but I don't know if it can still work under other OS.
Need your help, thank you.
Regards,
Damu
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Damu,
If you've tested that code (using "/" as separator in the path name) on Windows, it should be OK on other platforms too IMO.
Does getResource() javadoc say something about the path name format ? (I have no doc with me for two days ).
Best,
Phil.
 
jQuery in Action, 2nd edition
 
subject: How to specify a path of a certain file?
 
Similar Threads
how to add to a application path??
Chessboard-Newbie Question
Problem with creating a file in the current directory and with the current time stamp
icons an xml in java projram
specify relative path in File constructor