Getting started with Java

How to start with Java 

If you ask me how to start with java, I would say there are many ways- Some start by writing a simple java application, or go with creating applets, some go about learning servlets. Others need to learn about a particular technology area right away. No matter what your approach, to learn and develop applications written in the Java programming language, you must first set up the Java platform.Before you develop the application, you need to have the Java Platform Standard Edition (Java SE) development kit. It has the necessary Java Virtual Machine (JVM), core Application Programming Interfaces (API)s, and the compiler you’ll need for most and perhaps all of your development. Macintosh users should go to Apple’s Mac OS X Java Runtime Environment . Then return for Java programming information and tutorials. 

Usually any java or j2ee application developmnet will have a set of application kits.

The development kits include the APIs necessary to whatever type of applications you develop in the Java programming language. The APIs and compiler are explained briefly below.

  • Java APIs are libraries of compiled code let you add ready-made and customizable functionality to your programs to save coding time.
  • Java programs are executed within a program called the JVM. Rather than running directly on the native operating system, the program is interpreted by the JVM for the native operating system. This is key to making your programs portable from one platform to another. In other words, you can develop your programs on a Solaris, Linux, Macintosh, or Windows, then run it on another server or platform.
READ  Blocks and overloading - Java Tutorial

Once you have the development kits you need, you are ready to begin writing code in the Java programming language. Programs are written in three basic flavors: applets, applications, and servlets/JSP pages. Applets run in the JVM built into a web browser; applications run in the JVM installed on a computer system; and servlets/JSP run in the JVM installed on a web server.

  • Java Platform Standard Edition (Java SE): This kit is necessary for developing all applications, except those designed for consumer devices (See the Micro Edition). Java SE comes bundled with the compiler, a runtime environment, and core API.
  • Java Platform Enterprise Edition (Java EE): This packages includes an application server, web server, J2EE APIs, support for Enterprise JavaBeans, Java Servlets API, and JavaServer Pages (JSP) technology. Use J2EE with the Java SE.
  • Web Applications: Sun Java Studio Creator IDE is great for quick and easy web application development. In addition, this IDE is built on NetBeans, starting with a subset of the functionality and extending it. Java Studio Creator allows you to build applications visually, like with MS Visual Basic for building asp.net applications. The programming part is cleanly separated from the UI part.
  • Java Platform Micro Edition (Java ME): If you are interested in developing programs for Palm Pilots, screen phones, and other consumer devices, this kit provides tools for compiling, deployment and device configuration, and APIs that are specialized for each type of device.

Applets and applications are usually used to have some kind of user interface coupled to backend functionality, 

READ  java.util.stream

Servlets mainly provide the backend functionality only. The html usually playsthe fornt end for a servlet. It wil be JSP’s in a J2EE envirronment.
Any applet or application that opens a hypertext transfer protocol (HTTP) request can call a servlet. 
JSP, on the other hand, combines the servlet and HTML into a single component. Instead of using an HTML page with a separate servlet, you use an HTML page with regular HTML tags in combination with scriptlets, short bits of code. The entire page is then processed into a servlet when it’s accessed or submitted and the results return to the same HTML page that contains the code.