hey i used this code for testing:
URL url = modelsData.class.getResource(user+".dat");
String path = url.getPath();
now the thing is a changed the folder in which i need the url to point
too. its no longer in the same folder as the modelsData class. My
question is how can i put the path ihave into a URL?? I need to make
the url poitn to :
"C:/tomcat/webapps/export/ModelUsers/"+user+".dat";
but i can't figure out how to construct the URL in javadoc.
Thanks for any help
-morc
oulan bator - 07 Feb 2006 16:10 GMT
you can make
new File("C:/tomcat/webapps/export/ModelUsers/"+user+".dat").toURI()
or toURL()
regards
morc - 07 Feb 2006 17:01 GMT
thanks exactly what i needed.