How to set ANT_HOME on Ubuntu Desktop 12.04?

前端 未结 6 1605
时光取名叫无心
时光取名叫无心 2021-02-09 08:12

It looks like Ubuntu uses ~/.bashrc, ~/.bash_profile, ~/.pam_profile, /etc/environment, and /etc/profile in very

6条回答
  •  执念已碎
    2021-02-09 09:04

    To read the variable from java, use System.getenv().get("ANT_HOME"). Read more about it here.

    As for where to set it, I prefer using ~/.bashrc, unless you're going to run your program from other users, or with sudo. Then you should use /etc/environment

提交回复
热议问题