dcsimg
Problem with file.listFiles() of File class??
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   bikash_paul
Posted On:   Thursday, May 15, 2003 04:51 AM

Hi all friends, Iam facing with one peculiar problem,Iam using [file.listfiles()] method of File class in my program and this method of file class introduced in Java2.Now when Iam runing on Mac OS classic(8 to 9)[it is my client requirement they can't change Mac OS classic to Mac OS X] it is giving me error file.listfiles() not found in java.io package coz in Mac classic I have used MRJ2.2.6(for runtime) and MRJ SDK2.2 which is based on jdk1.1.8 and this method[listfiles()] added in java2.But now for me I can't change this method in program coz it is a big code and I have to change lot of things in my program.Can any one plz tell me can i find any (java.io) package of java2 seperately in the from of .jar or .zip so that i can keep it in my MRJCLASSES folder   More>>

Hi all friends,



Iam facing with one peculiar problem,Iam using [file.listfiles()] method of File class in my program and this method of file class introduced in Java2.Now when Iam runing on Mac OS classic(8 to 9)[it is my client requirement they can't change Mac OS classic to Mac OS X] it is giving me error file.listfiles() not found in java.io package coz in Mac classic I have used MRJ2.2.6(for runtime) and MRJ SDK2.2 which is based on jdk1.1.8 and this method[listfiles()] added in java2.But now for me I can't change this method in program coz it is a big code and I have to change lot of things in my program.Can any one plz tell me can i find any (java.io) package of java2 seperately in the from of .jar or .zip so that i can keep it in my MRJCLASSES folder and from there I can import it in my program.Eagerly waiting for reply.



Regards

Bikash

   <<Less

Re: Problem with file.listFiles() of File class??

Posted By:   Simon_Ablett  
Posted On:   Thursday, May 15, 2003 05:46 AM

I would not advise trying to mix-and-match the core jar files from different Java versions. What you should do is wrap the call to 'File.listFiles()' inside another class / method and then have different implementations of this for each of the different runtime environments. Obviously, this will cause you some work now but will save you a lot of hassle in the future.

Regards.
About | Sitemap | Contact