IntelliJ IDEA 2021.1 Introduces ‘Run Targets’ for Docker, SSH, and WSL Execution
JetBrains has unveiled IntelliJ IDEA 2021.1, the latest update to its flagship integrated development environment (IDE). This release introduces significant enhancements, including a new feature called “run targets,” improved Kotlin support, and compatibility with Java 16.
Introducing Run Targets
A standout feature in IntelliJ IDEA 2021.1 is the ability to configure run targets. This allows developers to execute their applications or tests in environments other than the local machine. By editing the run configuration, developers can now set their application to run in a Docker container, an SSH server, or the Windows Subsystem for Linux (WSL). This flexibility is crucial for remote testing and debugging, ensuring that applications behave consistently across different environments.
For instance, when running a Spring Boot application, developers can choose an SSH or Docker target. If Docker is selected, IntelliJ IDEA offers the option to pull or build an image. Code completions assist in selecting the correct image when pulling from a repository. This feature streamlines the deployment process and enhances the development workflow by providing a consistent environment for running applications.
Support for Java 16
IntelliJ IDEA 2021.1 also brings support for Java 16, which was released in March 2021. This includes the ability to refactor records in the same manner as other Java classes. Records, a feature introduced in Java 14 and finalized in Java 16, simplify the creation of classes that are primarily used to hold data. IntelliJ IDEA 2021.1 allows developers to migrate existing code to utilize new Java 16 language features, ensuring that projects remain up-to-date with the latest Java advancements.
Enhancements for Kotlin
In addition to Java 16 support, IntelliJ IDEA 2021.1 enhances support for Kotlin, JetBrains’ own statically typed programming language. This includes improvements in code completion, analysis, and other development tools tailored to Kotlin. As Kotlin continues to gain popularity, these enhancements ensure that developers have the best possible tools for writing and maintaining Kotlin code.
New Inspection Profiles and HTML Preview
Another significant addition in IntelliJ IDEA 2021.1 is the ability to select an inspection profile for analysis before committing code. This feature helps maintain code quality by running predefined inspections and identifying potential issues before the code is merged. Developers can customize these profiles to suit their specific needs, ensuring that their codebase adheres to the desired standards and practices.
The new built-in HTML preview feature allows developers to see changes in real-time as they edit HTML files. This immediate feedback helps developers understand how their changes will appear in a browser, streamlining the web development process. Combined with the existing tools for CSS and JavaScript, the HTML preview feature makes IntelliJ IDEA a robust environment for front-end development.
JSONPath Expression Handling
IntelliJ IDEA 2021.1 also introduces functionality for handling JSONPath expressions, a feature that simplifies working with JSON data. This addition is particularly useful for developers working with APIs and other data-driven applications, providing tools to navigate and manipulate JSON structures efficiently.
Conclusion
With IntelliJ IDEA 2021.1, JetBrains continues to enhance its IDE with features that cater to modern development needs. The introduction of run targets, support for Java 16, improved Kotlin tooling, and new inspection profiles and previews, all contribute to a more powerful and flexible development environment. As developers adopt these new features, IntelliJ IDEA remains a top choice for those seeking a comprehensive and innovative IDE