When I trying to run Ant — he show me an alert with “Project JDK not specified”. How I can use Ant in Intellij Idea for web-applications without JDK?
In the Project tool window, right-click the generated build file and select Add as Ant Build File to open it in the Ant tool window. In the Select Path dialog, navigate to the desired build. xml file, and click OK. A build file should have at least a root element to be added to the Ant Build tool window.
IntelliJ IDEA supports the latest stable Ant version. Ant is a flexible, platform-independent build tool from Apache Ant Project.
Ant build tool window xml to the project. You can use this tool window to add Ant build scripts to your project, control behavior of the build, and run build targets.
Open the Project Structure dialog (press Command + Semicolon shortcut). Navigate to the SDKs in the left pane. In the middle pane, click the + (add), and select "JDK". Make sure you have the JDK installed (available from the Oracle website), and navigate to the root of that location. Click OK. Then open the Ant Build pane on the right side. Right click the build and select Properties. Go to the Execution tab and from the "Run under JDK" drop-down, select the JDK version that you set up prior.
You still need JDK configured for Ant to work, either in the Project or in the Build file properties dialog (you can set custom JDK just for Ant).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With