Nav

To Configure Java JDK (Linux)

  1. Edit the startup file (~/.bashrc).

  2. Modify PATH variable.
    Make sure that the JDK 1.8.0/bin directory is the first item in your PATH environment variable, as shown below:

    
                
             
    1
    2
    
    PATH=/usr/local/jdk1.8.0/bin:$PATH
    export PATH
  3. Save and close the file.

  4. Load the startup file.

    
                
             
    1
    
    > . /.profile

To verify that your installation was configured correctly, type:


         
      
1
> java -version

This should print the version of the java tool.
If the version is other than your desired JDK, or you get the error "java: Command not found", then the JDK is not properly installed.

In this topic:

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+