Hi, Check the version of JDK you use, File.listFiles() is marked "since 1.2"
Hope it helps. Anton > -----Original Message----- > From: Mark Symonds [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 11, 2002 9:10 PM > To: [EMAIL PROTECTED] > Subject: listFiles() 500 errors > > > > Hi, > > We have tomcat installed and everything looks to > be OK (all of the examples work fine, and all of > our pages compile fine), except for one page which > makes a call to listFiles(). > > Here is the code snippet: > > [...] > > String ch = String.valueOf(request.getQueryString()); > try{ > File myfile = new File("/uploadedir/"); > File file[] = new File[200]; > file = myfile.listFiles(); > String str = ""; > if(ch.equals("all")) > > [...] > > And here is the error message: > > Error: 500 > Location: /servlets/alphaOrder.jsp > Internal Servlet Error: > > org.apache.jasper.JasperException: Unable to compile > Found 1 semantic error compiling > "/var/cache/tomcat/DEFAULT/ROOT/servlets/alphaOrder_1.java": > > 116. file = myfile.listFiles(); > <----------------> > *** Error: No method named "listFiles" was found in type "java/io/File". > > > ... we're stumped because everything else is working fine, > and if we comment out just that one line, it will work without > the error message (but without listing the files, ofcourse). > > The server is debian woody running a standard install, up > to date as of a few minutes ago. > > TIA, > > -- > Mark > > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
