IO Doubt
0 posts in topic
Flat View  Flat View

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("")).toString());

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

About | Sitemap | Contact