ubuntu: installing apache ant apache-ant-1.10.1

僤鯓⒐⒋嵵緔 提交于 2020-01-17 07:04:54

问题


$ ant -version
/home/rahul/java/jdk1.8.0_121/jre/bin/java: 6: /home/rahul/java/jdk1.8.0_121/jre/bin/java: Syntax error: ")" unexpected

How to resolve this?


回答1:


Please follow the below steps to install Apache Ant in Ubuntu-

Using Ubuntu Package Manager

sudo apt-get update    
sudo apt-get install ant

Manual Steps

wget http://www-eu.apache.org/dist//ant/binaries/apache-ant-1.10.5-bin.zip    
unzip apache-ant-1.10.5-bin.zip -d /usr/local/    
cd /usr/local/    
mv apache-ant-1.10.5 apache-ant    
ln -s /usr/local/apache-ant/ /usr/local/ant

vim /etc/profile.d/ant.sh
export ANT_HOME=/usr/local/ant
export PATH=${ANT_HOME}/bin:${PATH}


source /etc/profile    
ant –version
Apache Ant(TM) version 1.10.5 compiled on July 10 2018



回答2:


Type ant -version in the terminal(Ctrl+Alt+T)



来源:https://stackoverflow.com/questions/43384561/ubuntu-installing-apache-ant-apache-ant-1-10-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!