relative/absolute paths in Java
i have a program that reads in images; however, I'm having trouble displaying hte images using relative paths. My computer at home with java 1.5.0, the "/file\\image.gif" the path works fine, but when i'm compiling and runing on another machine i can't see the pictures, using relative path, it only works for absolute. the java at other computers are all 1.4.2_05. Is there something i'm doing wrong? or is this a bug in java?
thanks, djgerbavore |
/file\\image.gif is not a relative path, path\\image.gif or path/image.gif are, depending on the platform. Are you running on windows ?
See the path.separator system property. |
yes i'm running windows for this current project.
thanks |
All times are GMT -5. The time now is 01:29 PM. |