After setting PATH env var, "-bash: export: not a valid identifier

Latest response

Newb. I set up Java and Tomcat using the instructions at http://www.davidghedini.com/pg/entry/install_tomcat_7_on_centos. I didn't use YUM because I thought I could follow the process a little better with the .gz file.

In /usr/java I did tar -xzf jdk-7779-linux-x64.gz this created the folder /usr/java/jdk1.7.0_79/bin with the java binary file in it.

I added the following lines to /root/.bash_profile to set up homedir and path:

JAVA_HOME=/usr/java/jdk1.7.0_79  
export JAVA_HOME  
PATH=$JAVA_HOME/bin:$PATH  
export PATH

As part of the Tomcat setup, I added the same above lines to /etc/init.d/tomcat

Now when I log on (as root) from a console I get the following message:
-bash: export: '/usr/java/jdk1.7.0_79': not a valid identifier

What does this mean? Is Java being properly identified in the PATH?

Responses