Create a new "Java Project with Existing Sources".
Description from the "Java Free-Form Project"
Imports an existing Java application and its build script into an IDE project. In free-form projects, IDE commands use the Ant script that you provide to run, compile, and debug your project. Any modification of the build process must be handled directly in your Ant script. To make long-term maintenance of the project easier, consider using the Java Project with Existing Sources project template.