Is there a way to add multiple environment variables in IntelliJ? When one sends me a list of variables I can add them one by one by clicking +
in this window
But it's quite annoying to do for 10 or 20 variables every time. I can copy all variables from Environment variables
field but we cannot paste there. Is there any way to do it?
Add environment variablesFrom the main menu, select Run | Edit Configurations or choose Edit Configurations from the run/debug configurations selector on the toolbar. In the Run/Debug Configurations dialog, select a configuration you want to add the environment variables to.
Open settings, then select plugins In the search box search for “. env files support” and install it. After restarting IntelliJ you will have a new tab in the Run Configurations screen called EnvFile.
run -> Edit Configurations -> edit environment variables.
The . env file contains the individual user environment variables that override the variables set in the /etc/environment file. You can customize your environment variables as desired by modifying your . env file.
Yes, it's totally possible to paste all environment variables at once in this screen but they need to be in a specific format.
Click on the ...
button to the right of environment variables to show the dialog you have in your first screenshot.
Now you can use the Paste
button but the values in your clipboard have to be in a specific format for pasting to work. In your case that clipboard info would be something like this:
APP_PORT=8080
DB_URL=jdbc:mysql...
DB_USER=javausers
DB_PASSWORD=javausers
APP_LOGGING_LEVEL=DEBUG
Try copying the value above and use the paste button (not Ctrl+v
). If you don't have your data in this format you can try formatting it using a text replace tool online.
Also if you select all of the values in that dialog and click the copy button you can get the values in the same format that will work with importing. Warning: clicking Ctrl+c
will not copy the values in the same format as the copy button in the dialog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With