Vous êtes sur la page 1sur 4

Explaining Java and other technologies under it?

(Theory)
JSE / Java SE (Standard Edition) installed on servers.
JDBC
JAXB
================================================================================
======================================================================
JRE = JVM + Java Tools + Java API Libraries
JSDK/JDK = JRE + javac
JAVAC: Java Complier. If you wan to write Java programs then we need Java compil
er (javac).
JRE: Java Runtime Environment
JDK / JSDK: Java Development Kit / Java Software Development Kit.
Bytecode is the language that JVM understands.
Java borrowed the best of several programming languages including C, C++, C#, Ob
jective C, Cedar/Mesa, Smalltalk, Eiffel and Perl.
================================================================================
======================================================================
Important Notes:
1. Whatever the package name we use (e.g. package examples;) the file should res
ide in the same directory (examples in this case). The file should reside in a d
irectory that corresponds to the package name.
2. If we have class called "Hello" (public class Hello ) then the file name shou
ld be "Hello.java" (case sensitive).
3. In Java we use "==" for comparisons and "=" for assignment.
================================================================================
======================================================================
3 STEPS TO COMPILE AND INTERPRET A JAVA APPLICATION
1. create the source file.
2. Compile the source into bytecode using complier. javac examples\Hello.java
. Note javac is to comple the program and java is to run the program.
3. Interpret the bytecode. e.g. java examples/Hello
jar files are the zipped Java files which contains the compiles Java classes. De
velopers will export their code into JAR files and give it to users.
================================================================================
======================================================================
THE JSDK DIRECTORY STRUCTURE
C:\Program Files\Java
1. src.zip is an archive which contains all of the source code of the standard J
ava library classes; this can be expanded to view the source code. You can extra
ct and see the files to see how oracle folks write Java code.
2. bin/ contains javac compiler and the java interpreter; among other tools; thi
s directory needs to be in your PATH environment variable.
3. lib/ contains JAR (Java ARchive) files used to Java tools.
4. jre/ contains the sub directories with files for JRE

jre/bin/ contains copies of the tools used at runtime and libraries that they us
e.
jre/lib/ contains resources files for fonts etc. and the standard Java library c
lassfiles (in rt.jar)
4. include/ contains C header files for use with the Java Native Interface.
Note that for just the JRE environment we will not have JAVAC in the bin directo
ry. However in JRE the LIB direcotry has rt.jar file which contains the compiled
version of Java libraries.
================================================================================
======================================================================
OTHER TOOLS IN JSDK
(http://docs.oracle.com/javase/7/docs/technotes/tools/#b
asic)
javac - the source code compiler. Java produces architecture neutral bytecode. T
he compiler produces a bytecode file Classname class e.g. javac HelloWorld.java
produces HelloWorld.java class.
java - the bytecode intepreter. the Java VM interprets bytecode for specific arc
hitecture. This is how stand-alone (non-applet) Java programs are executed.
Sytax: java Classname
e.g.: java HelloWorld
//we dont include the .java
appletviewer - a mini-browser for testing applets.
javap - c Hello
///in case you want to look at byte code.
================================================================================
======================================================================
DATATYPES AND VARIABLES

================================================================================
======================================================================
================================================================================
======================================================================
================================================================================
======================================================================
================================================================================
======================================================================
================================================================================
======================================================================
================================================================================
======================================================================
================================================================================
======================================================================
JAX RS
JAX WS
Servlets JSP
EJB
JSF

JEE
STRUTS
HIBERNATE
SPRING
MYBATIS
jAVA is used for System Software & Application software. Major focus of Java is
on Application development. (C++ leads in System software development).
JRE: Java Runtime Environment
JDK: Java Development Kit. JDK is superset of JRE.
Java EE: Java Enterprise Edition. It is a platform providing enterprise solution
. It uses network services and web services. Based on multi tier architecture.
HTML is used for static content.
JSP (Java Server Pages)/Servlet is used for Dynamic content. JSP/servlet are ser
ver side components. Capable of returning HTML pages back to client based on req
uest.
EJB(Enterprise Java Beans): mainly used for encapsulating complex business logic
. Server side components. Require special type of EJB container.
Client <> Application Server [{Servlet container (JSP/Servlet)} <---> {EJB Conta
iner (EJB)}]
Servlet Container example Apache Tomcat.
Application server example JBOS, WebSphere, WebLogic.
EJB has inbuilt support for clustering thus scalable. Other advantages include d
irect invocationfrom any java based app, transaction management, data source man
agemnet, security, persistance etc.
JDBC (Java Database Connectivity)
JAXB (Java API for XML Bindings). XML to Java and vice versa.
JSF: (Java Server Faces). Supports Rich Web interfaces.
Struts: Is a framework developed to build neat web app. Inspired from front cont
roller pattern and dispatching filter. common logic concentrated at one place.
Spring: framework which allows Dependency Injection. Allows integration across v
ariety of Java based tools. It has MVC flavor for web apps. It was mainly invent
ed to solve the complexities involved in EJB apps.
Hibernate: It is a ORM (Object Relation Mapping) tool allows converstion from re
lational paradigm to object world and vice versa. It has inbuilt caching and all
ows integration with second level cache. It supports persistence.
Java IDE: Eclipse, Net beans, IntelliJ Idea.
Build and Deployment
For Desktop/library/Framework - jar (Java ARchive)
For JSP/Servlet/Spring MVC - war (Web ARchive)
for EJB app ear - (Enterprise ARchive)
Build tools: These are used for development and deployment of applications. Most
popular
Apache Ant

Maven
================================================================================
======================================================================