Introduction to JAVA
Dr. M H B Ariyaratne
https://goo.gl/LGWbU9
What is java
Computing platform
Programming Language
APIs
History of java
By Sun Microsystems
Initiated in 1991 as OAK
Released in 1995
Oracle acquired Sun Microsystems and took ownership in 2009
JVM
● An abstract computing machine that enables a
computer to run a Java program
● Java bytecode can be executed
● platform dependent
● Notations
○ Specification
○ Implementation
○ Instance
JRE
Java Runtime Environment
Provide the runtime environment.
An implementation of JVM + set of libraries + other files
JDK
● Java Development Kit
● JVM + few other resources such as
○ interpreter/loader
○ a compiler (javac)
○ an archiver (jar)
○ a documentation generator (Javadoc)
Java as a Language
● High Level Language
● Object oriented
● Platform Independent - “Write once - run anywhere”
● Simple
● Secure
● Multi-threaded
● Robust
Java Editions
Java SE
Java ME
Java EE
Tools Needed For Java
● Linux/Windows Operating System
● Java Development Kit
● Text-editor
● Optionally an IDE - Ex. Netbeans
Setting up Environment for Java
● Download JDK
● Set Variables
○ JAVA_HOME
○ PATH
○ ClassPath
● Download Java Editor
○ Notepad
○ Netbeans
○ Eclipse
Hello World Example
● In Notepad write
public class HelloWorld{
public static void main(String args[]){
System.out.print("Hello World");
}
}
Thank you

3. introduction to java

  • 1.
    Introduction to JAVA Dr.M H B Ariyaratne https://goo.gl/LGWbU9
  • 2.
    What is java Computingplatform Programming Language APIs
  • 3.
    History of java BySun Microsystems Initiated in 1991 as OAK Released in 1995 Oracle acquired Sun Microsystems and took ownership in 2009
  • 4.
    JVM ● An abstractcomputing machine that enables a computer to run a Java program ● Java bytecode can be executed ● platform dependent ● Notations ○ Specification ○ Implementation ○ Instance
  • 5.
    JRE Java Runtime Environment Providethe runtime environment. An implementation of JVM + set of libraries + other files
  • 6.
    JDK ● Java DevelopmentKit ● JVM + few other resources such as ○ interpreter/loader ○ a compiler (javac) ○ an archiver (jar) ○ a documentation generator (Javadoc)
  • 7.
    Java as aLanguage ● High Level Language ● Object oriented ● Platform Independent - “Write once - run anywhere” ● Simple ● Secure ● Multi-threaded ● Robust
  • 8.
  • 9.
    Tools Needed ForJava ● Linux/Windows Operating System ● Java Development Kit ● Text-editor ● Optionally an IDE - Ex. Netbeans
  • 10.
    Setting up Environmentfor Java ● Download JDK ● Set Variables ○ JAVA_HOME ○ PATH ○ ClassPath ● Download Java Editor ○ Notepad ○ Netbeans ○ Eclipse
  • 11.
    Hello World Example ●In Notepad write public class HelloWorld{ public static void main(String args[]){ System.out.print("Hello World"); } }
  • 12.

Editor's Notes

  • #3 Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
  • #4 Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
  • #5 A Java virtual machine (JVM) is an abstract computing machine that enables a computer to run a Java program. There are three notions of the JVM: specification, implementation, and instance. The specification is a document that formally describes what is required of a JVM implementation. Having a single specification ensures all implementations are interoperable. A JVM implementation is a computer program that meets the requirements of the JVM specification. An instance of a JVM is an implementation running in a process that executes a computer program compiled into Java bytecode. The Oracle Corporation, which owns the Java trademark, distributes the Java Virtual Machine implementation HotSpot together with an implementation of the Java Class Library under the name Java Runtime Environment (JRE).
  • #8 An Object-Oriented Language Java is an object-oriented language similar to C++, but simplified to eliminate language features that cause common programming errors. Java source code files (files with a .java extension) are compiled into a format called bytecode (files with a .class extension), which can then be executed by a Java interpreter. Compiled Java code can run on most computers because Java interpreters and runtime environments, known as Java Virtual Machines (VMs), exist for most operating systems, including UNIX, the Macintosh OS, and Windows. Bytecode can also be converted directly into machine language instructions by a just-in-time compiler (JIT). In 2007, most Java technologies were released under the GNU General Public License.