Categories
eclipse java liferay liferay-ide ubuntu

how to set the environment variable ANT_OPTS in ubuntu?

while setting up liferay environment in Ubuntu 10.0.4, i have set the environment variables like this in .bashrc file

PATH=/usr/bin/java/jdk1.7.0_51/bin:$PATH
export PATH
JAVA_HOME=/usr/bin/java/jdk1.7.0_51
export JAVA_HOME
PATH=/usr/bin/ant/bin:$PATH
export PATH
ANT_HOME=/usr/bin/ant
export ANT_HOME
ANT_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
export ANT_OPTS
set path=$path $ANT_HOME/bin

i have tested environment variables like this in my terminal:

[email protected]:~$ echo $PATH
/usr/bin/ant/bin:/usr/bin/java/jdk1.7.0_51/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
[email protected]:~$ echo $JAVA_HOME
/usr/bin/java/jdk1.7.0_51
[email protected]:~$ echo $ANT_HOME
/usr/bin/ant
[email protected]:~$ echo $ANT_OPTS
-Xmx1024m -XX:MaxPermSize=256m

while running build-themes for liferay getting following error:

Buildfile: /home/sudheer/Desktop/Life-ray/Liferay_workspace/portal/portal-web/build.xml
BUILD FAILED
/home/sudheer/Desktop/Life-ray/Liferay_workspace/portal/portal-web/build.xml:4: The following error occurred while executing this line:
/home/sudheer/Desktop/Life-ray/Liferay_workspace/portal/build-common-web.xml:4: The following error occurred while executing this line:
/home/sudheer/Desktop/Life-ray/Liferay_workspace/portal/build-common.xml:393: .
Please set the environment variable ANT_OPTS to the recommended value of
"-Xmx1024m -XX:MaxPermSize=512m".
Total time: 2 seconds