My PATH
and JAVA_HOME
are defined in ~/.bashrc
.
However, when I launch Intellij from my Favorite icon and then launch a Maven Run Configuration, these variables are not thus defined. f I run the same idea.sh
that is run from the Favorites icon, then they are recognized.
My pom.xml
does some exec
, so having these environment variables is essential.
The setting for "Include System Environment Variables" is checked. (As a test, I previously defined env variable FOOBAR
-- we see it is missing here.) [].
How can I make this happen automatically, even when I use the Favorites icon? The desktop
file is given below.
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Ultimate Edition
Icon=/hdd/executables/idea-IU-191.6707.61/bin/idea.svg
Exec="/hdd/executables/idea-IU-191.6707.61/bin/idea.sh" %f
Comment=Capable and Ergonomic IDE for JVM
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea
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.
If you want to reassign the existing variable to a new one, press Ctrl+Alt+V . If you have more than one existing variable, IntelliJ IDEA displays a list to choose from. You can press Shift+Tab to change a type of the variable.
Build, Execution and Deployment -> Build Tools -> Maven -> Runner -> Environment
Environment Variables
text box.Include System Environment Variables
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