0

I'm building java (jdk 8) application.

I want to run the application (run/debug mode) from my IDE (Intellij IDEA).

My application use some environment variables.

I know I can add the environment variables one by one in the Run/Debug configurations -> environment variables.

  • Is it possible to load all those environment variables from file (i.e env.list file) ?
  • How can I tell the IDE to load the environment variables from file when running the application in Run/Debug mode ?
Boom
  • 1,145
  • 18
  • 44

2 Answers2

2

Right now there is no choice like that in IDEs. We have to manually feed all those stuffs in the Run/Debug configuration. If you want you can add it as part of your gradle / maven from there you can do all those expected functionalitites and configure that task in the Run/Debug configuration. That only will solve your problem.

Hakuna Matata
  • 755
  • 3
  • 13
1

There is no direct way to do this.

The only things that comes to my mind is:

  • I don't know the version of your IDEA but there are plugins for that like this one, EnvFile. But the format of these files are limited.

If you don't want to use it from directly from IDE you can code:

Five
  • 378
  • 2
  • 19