The use case is that we need some environment variable available to the applications (python \ java)
These variables are created by bash script. While the script is very simple, it does contain some logic (like handling defaults, checking some system settings, etc) - so it can't be simply replaced by static environment configuration
Is there a way in pycharm and \ or intelij to source a shell script before executing the main program?
Specifically for pycharm, it's possible to use a script instead of a "real" python interpreter.
using a script that sets up environment and then launches the "real" python interpreter works great
something like:
#!/bin/sh
. env.sh
python "$@"
didn't find a way to do a similar thing with java
No, it's not possible. Please vote for the related feature request.
There was also a similar question already asked here.
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