Monday, September 1, 2014

How to install Java in Linux

http://kaliinfo.blogspot.in/












Download , Installation and Configuration of jdk on Kali Linux

Download

1)              Open the URL

2)                 Download the file jdk-6u24-linux-i586.bin
(so this file is stored in Home folder otherwise place it in Home folder)
  

Installation
         1)                  Open terminal
<user that logged in>@<computer's hostname>:~#

What you see here is called the prompt. It signifies that the computer is ready and awaiting user input. ~ is the current directory (the user's home directory).

2)              For example you are login as
root@localhost:~#

3)              Run the command as
              root@localhost:~#bash ../ jdk-6u24-linux-i586.bin
           
                           Bash is a sh-compatible command language interpreter that    executes commands read from the standard input or from a file.
                    
          4)             Run the command as
root@localhost:~# exit
 

Configuration

5)           Open terminal

6)       Run the command as
            root@localhost:~# ln –s jdk1.6.0_24  jdk

The ln –s shell command normally uses the symlink system call, 
which creates a symbolic link. jdk1.6.0_24[target_path] 
is the relative or absolute path to which the symbolic link should point. 
Usually the target will exist, although symbolic links may be 
created to non-existent targets. jdk [link_path] is the path of the symbolic link.
 
7)                 Run the command as
               root@localhost:~# ls –l

8)                 Run the command as
               root@localhost:~# cd ..


9)                 Run the command as
               root@localhost:~# nautilus .
 
 Redirect to the current directory console.

10)             Click on view⟶show hidden files

11)             Right click on file bashrc & open with Text Editor.

12)                 Set the environment variables with following lines type in last.
  
  export JAVA_HOME=$HOME/jdk
  export PATH=.:$JAVA_HOME/bin:$PATH
 
13)                 Save it.

14)                 Run the command as
     root@localhost:~# exit

            15)                 Open terminal

              16)                Run the command as
 root@localhost:~# java -version
These commands display what version of java (the interpreter that runs Java programs) and javac (the compiler that creates them) you have installed.

You are getting screen as below.
 
http://kaliinfo.blogspot.in/