• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

i am geting rerror

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
package tomcat;
import java.io.*;

public class CacheCleaner {

public static void main(String args[]){
try{
CacheCleaner c = new CacheCleaner();
c.listDir("D:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\work\\Catalina\\localhost");
}catch(Exception e){
System.out.println("Exception in main:"+e);
}
}

public void listDir(String dir){
try{
File f = new File(dir);
if(f.isDirectory()){
System.out.println(f.getName()+"/");
String path = f.getCanonicalPath();
String files[] = f.list();
for(String s : files){
listDir(path+"\\"+s);
}
}else if(f.isFile()){
f.delete();
}
}catch(Exception e){
System.out.println("Exception in e:"+e);
}
}
}
 
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please Use Code Tags when you post a source code. You can edit your message using button and then add code tags to it.

Saying It Doesnt Work Is Useless, what is the error you are getting...
 
Ankit Garg
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also this is not concerned with Servlets so I'll move it.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please show some effort and use a meaningful subject line
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic