Run and Debug Java in WSL 2 with Intellij IDEA on Windows 10

Patrick picture Patrick · Oct 17, 2019 · Viewed 9.8k times · Source

Intellij IDEA is installed on Windows. The java application built with maven requires native libraries (with JNI) and runs on Ubuntu.

Using maven and git on Windows is fine. How can I point Intellij IDEA to use the JDK from WSL so I can create a run/debug configuration that uses the WSL?

Answer

user10239343 picture user10239343 · Sep 24, 2020

Deploy your app on WSL with Power Shell, and remote debug