Tuesday, 30 June 2015

JAVA Introduction



"java" is a slang term for "coffee" thats why java has a coffee cup symbol. 


java is high-level program developed by James Gosling and sun microsystem in 1995.java is platform independent means that you can create code and compile for once and that will be run in every machine.

How to configure JAVA ?

You can download latest version of java from here java.com and follow the steps.

You can check java is present in this directory c:\Program Files\java:

setting up java path in windows:


  • right click on 'My computer' navigate to properties.
  • click on the environment variable button under 'advanced' setting tab.
  • now add new variable named 'JAVA_HOME' or 'PATH' to the java executable example JAVA_HOME variable and its path is c:\Program Files\java\jdk\bin and add second variable named JRE_HOME and its path is c:\Program Files\java\jre\bin . This paths are globle accepted by all development tool. 


setting  up java in linux based operating system:


  • install java in ubuntu using sudo apt-get install openjdk-6-jdk command.
  • set environment variables as follows:
    • update the system Path file /etc/profile
      • sudo gedit /etc/profile 
    • Add following lines at the end

JAVA_HOME=/usr/lib/jvm/jdk1.7.0
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH