Error Building Java Swing GUI Project in IntelliJ Ultimate with JDK 17 from WSL2

Answered

Hello,

I have WSL2 and openjdk-17 installed in WSL2 with path set properly. I am trying to open a project located in WSL2 in IntelliJ ultimate, and I'm having trouble building projects. This is a Java Swing project, and I am trying to view the GUI. I have properly selected JDK 17 in my project structure, but get the error:

Cannot run program "\\wsl$\Ubuntu\usr\lib\jvm\java-17-openjdk-amd64\bin\java" (in directory "C:\Users\aaron\AppData\Local\Temp\FormPreview"): CreateProcess error=193, %1 is not a valid Win32 application

I'm confused why \AppData\Local\Temp\ is being accessed. On a fresh install, the FormPreview worked, when there was no SDK installed, and once i selected an SDK, everything stopped working. I am very confused and any help would be appreciated!

3
1 comment

Running application servers in WSL is not yet supported.

 See IDEA-265214 and leave your comment inside. 

Feel free to watch it in order to be notified once it has updates. See this article if you are not familiar with YouTrack.

0

Please sign in to leave a comment.