首页 > 技术文章 > crontab读不来环境变量

zklidd 2015-04-02 15:57 原文

无法识别java

nohup: failed to run command `java': No such file or directory

 

那么在shell中加两行即可解决

. /etc/profile

. ~/.bash_profile

所有的文件如下:

#!/bin/bash
. /etc/profile
. ~/.bash_profile

java -Djava.ext.dirs=./lib -Djava.blarblar、、、

 

推荐阅读