IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Run targets

Last modified: 11 February 2024

You can run your code in another environment such as cloud or a Docker container directly from IntelliJ IDEA.

For certain run/debug configurations, you can run your code in another environment such as cloud or a Docker container directly from IntelliJ IDEA.

This feature allows you to instantly test the changes against the real environment the app is intended for. This ensures that there will be no incompatibilities when moving to production, which is especially important when working on code that heavily depends on the environment.

Running the app directly in such environment also spares you the extra actions normally required to deploy and run the app every time something changes.

The environment that is used for running the app is referred to as target. For IntelliJ IDEA to run code on a target, the target has to define a language runtime, which represents something on the target that can be used by a run/debug configuration to run code. For example, the Application and Maven run/debug configurations would need a JDK and Maven respectively.

In order to run your code on a target, all you need is to define the target execution environment in the run/debug configuration that you would normally use for local run. After you have done that, launching the app on a target is no different than launching it locally.