Home > Net >  Setting up environment variables in IntelliJ using WSL
Setting up environment variables in IntelliJ using WSL

Time:09-22

I am using IntelliJ 2021.2.1 on Windows 10 on a project that runs in WSL2 > Ubuntu

My project is set so that it fails to run if the environment variables are not set.

If I go to Settings > Terminal , there is an option to set environment variables. I added them using the pattern: VAR1=VALUE1;VAR2=VALUE2 .

enter image description here

They seem to be loaded correctly as they are listed on the Environment Variables dialog.

enter image description here

When I run the project using IntelliJ, it opens on the IntelliJ terminal, but the project fails to run because the variables are not set.

Is there something I'm missing from the configuration?

CodePudding user response:

It's a known bug in IntelliJ IDEA.

  • Related