40

Click here to load reader

Java Semimar Slide (Cetpa)

Embed Size (px)

Citation preview

Page 1: Java Semimar Slide (Cetpa)

.Welcome

To

Interactive Session with

CETPA

Page 2: Java Semimar Slide (Cetpa)

This Session Include :

1. YOU : The “Technocrats ”

2. Market : Your destination

3. Us : The medium

Page 3: Java Semimar Slide (Cetpa)

National Overview : Shanghai Jiao Tong University's Academic Ranking of World

Universities, only one IIT (IIT Kgp ) was listed among the top 500 universities worldwide.

Total number of private Engineering colleges in India is more than 3000 in the year 2010.

Every year more than 8 lakh Engineers are produced ….!!

Only top 10% college of Engineering are able to provide job to students through Campus selection.

Page 4: Java Semimar Slide (Cetpa)

Market scenario :The 2008 slowdown is over now

TCS Plans to Recruit 50,000 Employees in 2011 –N Chandrasekaran , CEO

INFOSYS plans to recruit 36,000 in just one quarter .in 2nd quarter 14,000 out of which 9000 are FRESHERS –T V Mohandas Pai ,Director HR,

Java developers in such demand that banks could use them as currency to repay the nation - Harsh Manglik , Chairman, NASSCOM

Page 5: Java Semimar Slide (Cetpa)

Actual Scenario : TruthInfosys rejects 94% of applications it received:A dream company to many. It received a whooping 4,00,812 applications from prospective employees, 77,000 applicants underwent written test,61,000 were interviewed and 26,200 job offers were made in the year 2009-10. Which is only 6 percent of the total applications received.

The question is Why ??

Page 6: Java Semimar Slide (Cetpa)

CETPA : The Missing Link !! We are bridging this gap since 2002.

system, etc.

Page 7: Java Semimar Slide (Cetpa)

CETPA : The Missing Link !! Our trainees are now at :

Page 8: Java Semimar Slide (Cetpa)

1st year : Computer programming concepts 2nd year : DS using “C” 3rd year : Web Technology + Lab. + Mini project (2 credit ) 7th Sem : project (4 credit) + Training (2 credit) 8th Sem : project ( 12 credit )

2nd year : ( IT ) Object Oriented Systems Unit IV : Java programming .

BCA MCA MSc (IT) PGDCA

UPTU , BPUT, RGPV almost All…

Page 9: Java Semimar Slide (Cetpa)

JAVA TECHNOLOGY .

Page 10: Java Semimar Slide (Cetpa)

Is JAVA obsolete …….?

• Apple said that Java on Mac had been "deprecated" and it "may be removed from future versions of Mac OS but the future of Java development on Macs is secure. In November, Apple and Oracle announced that they would collaborate on a Mac-based incarnation of OpenJDK, an open source version of Java.

• SAP is integrating ABAP with JAVA.Then the field will be so much populated by java programmers that it will be going to be the end to ABAPers.

• A/c to Gartner Research, 82 percent of U.S. corporations use Java in some capacity.

• Android from the Open Handset Alliance, whose 34 members include Google, HTC, Motorola. It is supported by over 34 major software, hardware and telecoms companies. Application programming is primarily done in Java.

• One of Java’s best features is the truth that even it is a very powerful and vigorous, this programming languages comes out free, being open source.

Page 11: Java Semimar Slide (Cetpa)

Lets begin….• Java Programming was developed by James Gosling in 1995, at

present subsidiary of Oracle Corporations, which was then called as sun Micro-systems.

• Java is a third generation programming language. It has an in built application interface which has the ability to handle the graphics and user interfaces that creates the applets or applications.

• WORA : Because applications written in the Java programming language are compiled into machine-independent bytecodes, they run consistently on any Java platform. The very advantage of java is its “portability”, the programmer can write the program and compile in the same kind of environment as it is written and after that it can be run anywhere.

Page 12: Java Semimar Slide (Cetpa)

Basics ……. Generations of programming languages

• 1ST - NO TRANSLATOR USED TO COMPLIE

• 2ND – SPECIFIC TO PARTICULAR PROCESSOR

• 3RD - SYNONYM TO HIGH LEVEL ( C , C++ , C# , JAVA, COBOL)

• 4TH - DOMAIN SPECIFIC PROGRAMMING ( SAS, ABAP, COLD FUSION )

• 5TH - BASED ON CONSTRAINTS RATHER THAN ALGO ( PROLOG , Mercury )

Page 13: Java Semimar Slide (Cetpa)

About JAVA Technology

• Java technology is both a programming language and a platform.

• The Java programming language is a high-level language that can be characterized by all of the following buzzwords:

Simple Architecture neutral Object oriented Portable Distributed High performance Multithreaded Robust Dynamic Secure

• Unlike in c/c++ you need not manually allocate/de allocate dynamic memory, java itself does this and also it has garbage collection for the unused objects. Java program handles the run time errors too.

• It is not always possible to compile the complete program at the same time, so java uses just-in-time compiler to compile a set of bytecodes in real time for execution and the remaining codes will just be interpreted and thus makes the execution of Java program faster.

Page 14: Java Semimar Slide (Cetpa)

The Java platform has two components: • 1. The Java Virtual Machine

2. The Java Application Programming Interface (API) The API is a large collection of ready-made software

components that provide many useful capabilities. It is grouped into PACKAGES (libraries of related classes and interfaces)

Page 15: Java Semimar Slide (Cetpa)

The Java Programming Language

• J2SE• J2EE• J2ME• JCSP re it stands for "Communicating Sequential Processes for

Java, Robot Edition“work done at the University of Kent. Alex Panayotopoulos, a Masters research student at Napier University Edinburgh

Page 16: Java Semimar Slide (Cetpa)

The Java Versions : J2SE

J2SE versions : -

version Release date Codename New FeaturesJDK 1.0 Jan 23, 1996 Oak 1st stable version was jdk 1.0.2

JDK 1.1 Feb 19, 1997 ---- inner classes,JavaBeansJDBC,RMI,Reflection added to the language

J2SE 1.2 Dec 8, 1998 Playground. • Collections framework• Sun's JVM was equipped with a JIT compiler for the first time.

J2SE 1.3 May 8, 2000 Kestrel •RMI was modified to support optional compatibility with CORBA•(JNDI) included in core libraries

J2SE 1.4 Feb 6, 2002 Merlin •Internet Protocol version 6 (IPv6) support•assert keyword

J2SE 5.0 Sep 30, 2004 Tiger. •Generics•Metadata•Autoboxing features added.

Java SE 6 Dec 11, 2006 Mustang Support for older Win9x versions dropped.

Page 17: Java Semimar Slide (Cetpa)

The Java Versions : J2SE versions : -

version Release date Codename JAVA SE 6

was updated 24 times

Lst update on Dec 8, 2010

------- • Scripting Language Support • performance updates to the Hotspot JIT compiler• A new Swing look and feel called Nimbus

Java SE 7.0 Feb 18, 2011, Dolphin •CMS or Concurrent Mark-Sweep collector) was replaced with the G1 garbage collector•JVM support for dynamic languages,

Java SE 8.0 expected in late 2012

------ • Modularization of the JDK under Project Jigsaw

• Language-level support for lambda expressions

Page 18: Java Semimar Slide (Cetpa)

In Windows : Creating an Application

• The Java SE Development Kit 6 (JDK 6) • A text editor /**  * The HelloWorldApp class implements an application that  * simply prints "Hello World!" to standard output.  */ class HelloWorldApp {      public static void main (String[ ] args ) {       System.out.println("Hello World !"); // Display the string.      } } *Both the compiler (javac) and launcher tool (java) are case-sensitive

Page 19: Java Semimar Slide (Cetpa)

Creating Your First Application

Page 20: Java Semimar Slide (Cetpa)

Creation of CLASS File……..

• Now you are ready to compile. At the prompt, type the following command and press Enter.

javac HelloWorldApp.java The compiler has generated a bytecode file,

Page 21: Java Semimar Slide (Cetpa)

Running the program………...•

If no Microsoft JVM is installed on the system

Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Mark>jview'jview' is not recognized as an internal or external command,operable program or batch file.

If a copy of the Microsoft JVM installed

Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Mark>jview

Microsoft (R) Command-line Loader for Java Version 5.00.3810Copyright (C) Microsoft Corp 1996-2000. All rights reserved.

• RunDll32 advpack.dll,LaunchINFSection java.inf,UnInstall If you are running an older version of the JVM you may need to upgrade to version 3809 or 3810 (windows update) before the above command will work.

Page 22: Java Semimar Slide (Cetpa)

Running the program………... 1. Open a command prompt and type cd \ dir javac* /s If it didn't find any files, install the JDK to compile your java

program.

2. Set the CLASSPATH Right click "My Computer" and select "Properties". (or Win +

Pause) Go to the "Advanced" Tab Click the "Environment Variables" button near the bottom of the dialog

Page 23: Java Semimar Slide (Cetpa)

In LINUX Continued ………..• Install the Java SE Development Kit 6 (JDK 6) You can download the Solaris OS or Linux version. • A text editor In this example, we'll use Pico, an editor available for

many UNIX-based platforms. You can easily adapt these instructions if you use a different text editor, such as vi or emacs.

• In the Pico editor, you can save this by typing Ctrl-O and then, at the bottom where you see the prompt

File Name to write . For example, you type

/home/jdoe/java/HelloWorldApp.java and press Return.• You can type Ctrl-X to exit Pico.

Page 24: Java Semimar Slide (Cetpa)

Running Java in Linux/Unix ….

Page 25: Java Semimar Slide (Cetpa)

Discussion over the program• Comments are ignored by the compiler 1. /* text */ 2. // text 3. /** documentation * / • The keyword class begins the class definition, and the code for each

class appears between the opening and closing curly braces marked in bold above.

• The main method accepts a single argument: an array of elements of type String.

• String is the predefined class present in java , it contains array of characters ( args [ ] array of string arguments )

• System.out.println () here System is a predefined class in java , out is an object present in the system class (console) . Println is a method which points the output on system.out (console)

Page 26: Java Semimar Slide (Cetpa)

The Java Programming Language

Page 27: Java Semimar Slide (Cetpa)

The Java Programming Language

• Why the main is public ?• Why the main is static ?• How JVM works internally?• How memory is managed ?• What is JIT and whats its use ?• Bytecode ?? Why so !!

• Each Java application runs inside a runtime instance of some concrete implementation of the abstract specification of the Java virtual machine.

Page 28: Java Semimar Slide (Cetpa)

Applications on the NetBeans IDE:• The Java SE Development Kit 6 (JDK 6) • The NetBeans IDE

• Create an IDE project : When you create an IDE project, you create an environment in which to build and run your applications. Using IDE projects eliminates configuration issues normally associated with developing on the command line. You can build or run your application by choosing a single menu item within the IDE.

• Add code to the generated source file : A source file contains code, written in the Java programming language, that you and other programmers can understand. As part of creating an IDE project, a skeleton source file will be automatically generated. You will then modify the source file to add the "Hello World!" message.

• Compile the source file into a .class file The IDE invokes the Java programming language compiler (javac), which takes your source file and translates its text into instructions that the Java virtual machine can understand. The instructions contained within this file are known as bytecodes.

• Run the program : The IDE invokes the Java application launcher tool (java), which uses the Java virtual machine to run your application.

Page 29: Java Semimar Slide (Cetpa)

Applications on the NetBeans IDE:

Page 30: Java Semimar Slide (Cetpa)

Applications on the NetBeans IDE:

Page 31: Java Semimar Slide (Cetpa)

Applications on the NetBeans IDE:

Page 32: Java Semimar Slide (Cetpa)

The Java Programming Language• To compile your source file, choose Build | Build Main Project

from the IDE's main menu.

• From the IDE's menu bar, choose Run | Run Main Project.

Page 33: Java Semimar Slide (Cetpa)

J2SE

Page 34: Java Semimar Slide (Cetpa)

J2EE Contains ……..

• The platform was known as Java 2 Platform, Enterprise Edition or J2EE until the name was changed to Java EE in version 5. The current version is called Java EE 6.

• Java EE includes several API specifications, such as JDBC, RMI, JMS, web services, XML, etc., and defines how to coordinate them. Java EE also features some specifications unique to Java EE for components. These include Enterprise JavaBeans, Connectors, servlets, JavaServer Pages and several web service technologies. This allows developers to create enterprise applications that are portable and scalable, and that integrate with legacy technologies.

Page 35: Java Semimar Slide (Cetpa)

J2EE ……..

• A Web Application ? Application developed in a browser controlled environment and accessed over a network

(inter/intra net ).

1. code on server & on each client 2. in 1995 , Netscape Javascript in 1996 , Macromedia Flash in 1999 “java” introduced Servlet 2.2 at that time both XML and

Javascript exist. in 2005 , Ajax was coined (Ex;- gmail more interactive) 3. Applications are broken into chunks called “TIERS” WEB ARCHITECTURES :-1. n-tier apporach (most common 3 – tier )2. Cannonical Web Architecture .

Page 36: Java Semimar Slide (Cetpa)

J2ME Contains ………..

• Java Platform, Micro Edition, or Java ME, is a Java platform designed for embedded systems (mobile devices are one kind of such systems) . Target devices range from industrial controls to mobile phones (especially feature phones) and set-top boxes. Java ME was formerly known as Java 2 Platform, Micro Edition (J2ME).

Page 37: Java Semimar Slide (Cetpa)

Development Environment in J2EE J2EE Web Servers

• Sun One J2ee Server• Weblogic Server• JBoss Server• Apache Tomcat Server ……….etc.

Various IDEs• Eclipse IDE.(IBM )• NetBeans IDE.• BlueJ IDE • Kawa IDE. ………….etc.

Page 38: Java Semimar Slide (Cetpa)

..J2EE Architecture

Page 39: Java Semimar Slide (Cetpa)

J2EE Components • Application clients and applets are components that run on the

client.• Java Servlet and JavaServer Pages (JSP) technology

components are web components that run on the server. • Enterprise JavaBeans (EJB) components (enterprise beans)

are business components that run on the server.

• EIS (Executive Information System) = Business Intelligence

Page 40: Java Semimar Slide (Cetpa)

CETPA : The Missing Link !!

[email protected] 8800340777