The specification forbids accessing files using java.io. There are other legal ways to access files, e.g. via a DataSource/JDBC driver, or via a resource connector.
See pp545 of "JSR 220: Enterprise JavaBeansTM,Version 3.0 EJB Core Contracts and Requirements"
... using JDBC for file access. Could you please explain it a bit more in detail?
A file is a data store in the same way that a database is. It's a pretty good data store for serially accessed, unstructured, character data, and not so great when you want transaction safety, multi-user access, writable random-access, or structured binary data. In an enterprise system you tend to have at least one of the latter set of requirements nearly all of the time.
Although it's not strictly true to say "In an enterprise system there are no files" (because there are log files and nearly all databases use files at a low level) it's a pretty good design rule-of-thumb, because of all of the problems that data files cause in a high performance, multi-user, transaction-safe, read-write, enterprise system.
Unfortunately the business world is full of business data stored in files. You have to deal with them. Some files (e.g. Excel spreadsheets) have enough in common with a simple database that they can be worth accessing through a JDBC driver. I've never heard of anyone accessing plain text files through a JDBC driver, but you could - or you could use a more generic resource adapter instead (according to the EJB3 specification, JDBC is a resource manager API).