If this file is a Java library, you should put it in the
userlib directory of your project. All
.jar files in this directory are automatically included on the classpath by Mendix when running the application, and are also correctly packaged for deployment when generating a deployment archive.
If the file is some other resource, you probably should place it in the
resources directory of your project. From a Java action you can access this location by calling
Core.getConfiguration().getResourcesPath(). This directory also gets automatically packaged by Mendix when creating a deployment archive.