码迷,mamicode.com
首页 > 编程语言 > 详细

运行jar包所需要的环境依赖

时间:2016-11-09 15:55:18      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:java

```

hadoop_HOME="/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/bin/../lib/hadoop"

 for f in $hadoop_HOME/hadoop-*.jar; do

         hadoop_CLASSPATH=${hadoop_CLASSPATH}:$f

 done

 for f in $hadoop_HOME/lib/*.jar; do

         hadoop_CLASSPATH=${hadoop_CLASSPATH}:$f

 done

 hadoopvfs_HOME="/home/work/tools/java/hadoop-client/hadoop-vfs"

 for f in $hadoopvfs_HOME/lib/*.jar; do

         hadoop_CLASSPATH=${hadoop_CLASSPATH}:$f

 done

export hadoop_CLASSPATH=${hadoop_CLASSPATH}:/home/boco4a/Utils-1.0-SNAPSHOT.jar

java -classpath $CLASSPATH:$hadoop_CLASSPATH  FTP.FtpPonshine2HDFS2

 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/work/tools/java/hadoop-client/hadoop/lib/native/Linux-amd64-64/

```

本文出自 “陈生龙” 博客,谢绝转载!

运行jar包所需要的环境依赖

标签:java

原文地址:http://chenshenglong.blog.51cto.com/8073124/1870971

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!