Launch mac eclipse with environment variables set

后端 未结 8 1601
隐瞒了意图╮
隐瞒了意图╮ 2020-11-29 00:16

My company provides an eclipse based development environment which needs some environment variables setting up for the underlying toolchain so multiple versions can be insta

8条回答
  •  甜味超标
    2020-11-29 00:40

    sakra's answer above is awesome, except is doesn't automatically inherit your existing bash environment. To ensure eclipse.sh picks up your existing bash environment, modify eclipse.sh to use bash instead of sh and add a line to source your existing ~/.bash_profile thus:

    #!/bin/bash
    source ~/.bash_profile
    logger "`dirname \"$0\"`/eclipse"
    exec "`dirname \"$0\"`/eclipse" $@
    

提交回复
热议问题