인프라 및 관리

클라우드 컴퓨팅

스토리지

런타임

통합 및 자동화

  • Comments
    • 태그

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

    게시일

    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?

    작성자

    포인트

    응답

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    빠른 링크

    도움말

    사이트 정보

    관련 사이트

    © 2026 Red Hat