[jcifs] java.lang.OutOfMemoryError: Java heap space

Jake Goulding goulding at vivisimo.com
Thu Sep 6 18:27:56 GMT 2007


Edwin:

I had the same problem. Mike suggested implementing a SmbFileFilter that
you can use while listing the directory. It will be passed each file as
the server reads it. returning false will cause it to not be added to
the result list that listFiles() returns. The only trick is you have to
be quick while processing each file, or else you can cause network timeouts.

Edwin Portscher wrote:
> Hello all,
> 
>  
> 
> Question when doing a SmbFile[] = smb.listfiles();
> 
>  
> 
> I am getting java.lang.OutOfMemoryError: Java heap space when the
> directory contains a lot of files
> 
>  
> 
> Any ideas?
> 
>  
> 
> Thanks
> 
> ed
> 


More information about the jcifs mailing list