You cannot rely on being able to access anything in an EAR file deployment as a java.io.File
object.
Java EE servers are not required to "explode" deployments in the file system and many will not. Some vendors may provide the option to do this but in general it's not wise to depend upon this capability.
Furthermore, plain files built into an EAR file become completely inaccessible using a class loader.
Within an EAR file objects can only be accessed from a class loader if they are inside an EAR/lib jar file, an EJB module, RAR module or WEB module (WAR). Even then there are rules regarding what modules can see in other modules, as described in the answer to My ear is not able to find ejb module classes
That said, your question is referring to a non-standard APP-INF/lib
directory. You would need to refer to your vendor documentation to discover what that enables. I vaguely recall it being a precursor to the standardisation of the EAR/lib mechanism (in Java EE 5 in 2009) in either WebLogic or WebSphere.