Launch mac eclipse with environment variables set

后端 未结 8 1599
隐瞒了意图╮
隐瞒了意图╮ 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:25

    Link to Eclipse doesn't use the path set in .bashrc

    1. Create simple script
    #!/bin/bash
    source /home/user/.environment_variables
    /home/user/eclipse_cpp/eclipse -Duser.name="My Name"
    

    2. Next put your all system variables in file /home/user/.environment_variables (any file you want)

    My looks like:

    export COCOS_ROOT=/home/user/Projects/edukoala
    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
    

    3. Now you can delete your variables in .bashrc and put line

    source /home/user/.environment_variables
    

    Everything works fine :)

提交回复
热议问题