Results 1 to 2 of 2
  1. #1
    lineker is offline Member
    Join Date
    Jul 2013
    Rep Power

    Default Set Up Java Enviroment

    Hi All,

    I am new to java and I will start from JSF because I have a bit fundamental.
    But unfortunatley I have problem to set up java enviroment.
    I am using linux:

    I am reading steps from an article. Here they are

    Verify Java installation on your machine

    $ java -version

    I see that java already installed at my pc, terminal screen is below:

    java version "1.7.0_25"
    OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.2)
    OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

    Now I want to apply below commands after findign where my java is installed!

    export JAVA_HOME=/usr/local/java-current
    export PATH=$PATH:$JAVA_HOME/bin/

    when I check /etc folder, I see following folders


    I assume that java-7-openjdk is the folder I look for, so I apply following commands:

    export JAVA_HOME=/etc/java-7-openjdk[
    export PATH=$PATH:$JAVA_HOME/bin/

    I also set up Maven.
    when I write terminal to see mvn version as follow as I get error

    mvn --version
    Error: JAVA_HOME is not defined correctly.
    We cannot execute /etc/java-7-openjdk/bin/java

    I know that there is no folder called /etc/java-7-openjdk/bin/java but then what I must I write to set java home?

  2. #2
    lineker is offline Member
    Join Date
    Jul 2013
    Rep Power

    Default Re: Set Up Java Enviroment


    I found below command to see my correct java path

    readlink -f $(which java)


Similar Threads

  1. setting up java enviroment
    By vastrolorde in forum New To Java
    Replies: 15
    Last Post: 08-22-2013, 10:01 AM
  2. Replies: 1
    Last Post: 11-19-2012, 11:58 AM
  3. Xuggle and enviroment variables
    By javment in forum Advanced Java
    Replies: 3
    Last Post: 11-03-2010, 08:20 PM
  4. Replies: 5
    Last Post: 08-26-2009, 11:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts