IO Doubt
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   champa_r
Posted On:   Thursday, December 6, 2001 08:01 PM


how to specify the filepath of a txt file in a java file using url.The txt file and the java file are in a jar file.
Sample code is below




ClassLoader cl=(new Ip()).getClass().getClassLoader();
f=new File((cl.getResource("ip.properties")).toString());



This is giving filepath specified is incorrect.Both the Ip.class , ip.properties file are in same jar file.
Thanx

About | Sitemap | Contact