Windows Subsystem for Linux (WSL) 2 provides a seamless Linux integration with many features. As developers, we can take full advantage of both OS at the same time.
WSL support on IntelliJ IDEA
For this example, I am using a Spring Boot project located in windows and run the project on a WSL2 Linux environment.
Add a spring boot run configuration as shown below and change the target to your Linux distribution.
Since this project is run on a JVM and build on Gradle, the Linux JDK and Gradle path should be configured as below.
Now this “Run Configuration” can be used to run this spring boot application pointed to the Linux environment.
The following screen capture shows “Before” and “After” Linux processes in WSL and a new process has been added after using the above Intellij idea run configuration.