Sunday, May 15, 2016

How to Install Apache Tomcat 8 and Get Started with Java Servlet Programming

This practical can be completed in a 3-hour session.
This installation and configuration guide is applicable to Tomcat 7 and 8, and possibly the earlier versions.
Take note that Tomcat 8 requires JDK 1.7. It will NOT work with JDK 1.6. If your JDK is below 1.7, upgrade it (See JDK How-To). You can check your JDK version via command "javac -version".


Writing your First Java Program in Eclipse

Step 0: Launch Eclipse
  1. Start Eclipse by running "eclipse.exe" in the Eclipse installed directory.
  2. Choose an appropriate directory for your workspace (i.e., where you would like to save your files).
  3. If the "Welcome" screen shows up, close it by clicking the "close" button.
Step 1: Create a new Java Project

How to Install NetBeans on Mac

To use NetBeans for Java programming, you need to first install JDK.
To install NetBeans:
  1. Download NetBeans from http://netbeans.org/downloads/. Choose platform "Mac OS X" ⇒ "Java SE" (e.g., "netbeans-7.x-ml-javase-macosx.dmg").
  2. Double-click the download Disk Image (DMG) file.
  3. Double-click the "NetBeans 7.x.mpkg", and follow the instructions to install NetBeans. NetBeans will be installed under "/Applications/NetBeans".
  4. Eject the Disk Image (".dmg").
You can launch NetBeans from the "Applications".
Notes: To uninstall NetBeans, drag the "/Applications/NetBeans" folder to trash.

How to Install Eclipse on Mac

To use Eclipse for Java programming, you need to first install JDK.
To install Eclipse:
  1. Download Eclipse from http://www.eclipse.org/downloads/. Choose "Mac OS X" ⇒ "Eclipse IDE for Java Developers" (or "Eclipse Classic"). You will receive a TAR file (e.g., "eclipse-java-juno-SR1-macosx-cocoa-x86_64.tar.gz") in "~/Downloads" folder.
  2. Double-click the downloaded TAR file to expand it into an folder called "eclipse".
  3. Drag the expanded "eclipse" folder to the "Applications" folder.
To start Eclipse, open the "eclipse" folder and click on the "Eclipse" icon. You may drag the "Eclipse" icon to the dock.
Notes: To uninstall Eclipse, drag the "/Applications/eclipse" folder to trash.

How to Install Eclipse 4.5 (Mars) for Java

1.1  For Windows

Step 0: Install JDK
To use Eclipse for Java programming, you need to first install Java Development Kit (JDK).
Step 1: Download
Download Eclipse from http://www.eclipse.org/downloads. For beginners, choose "Eclipse IDE for Java Developers" (32-bit or 64-bit) (e.g., "eclipse-java-luna-SR1a-win32-x86_64.zip").
Step 2: Unzip
To install Eclipse, simply unzip the downloaded file into a directory of your choice (e.g., "d:\myproject").
There is no need to run any installer. Moreover, you can simply delete the entire Eclipse directory when it is no longer needed (without running any un-installer). You are free to move or rename the directory. You can install (unzip) multiple copies of Eclipse in the same machine.

How to Install JDK 8 on Ubuntu

There are several JDK implementations available for Linux, such as Oracle JDK, OpenJDK, Sun JDK, IBM JDK and GNU Java Compiler. We shall choose the Oracle JDK 8. Ubuntu chooses OpenJDK as its default JDK, which is not 100% compatible with Oracle JDK.

How to Install JDK 8 and Get Started with Java Programming

Java Development Kit (JDK), officially named "Java Platform Standard Edition (Java SE)", which is freely available from Sun Microsystems (now part of Oracle), is needed for writing Java programs. The mother site for JDK (Java SE) is http://www.oracle.com/technetwork/java/index.html.
"JDK" or "JRE"?
JRE (Java Runtime) is needed for running Java programs. JDK (Java Development Kit), which includes JRE plus the development tools (such as compiler and debugger), is need for writing as well as running Java programs. Since you are supposed to write Java Programs, you should install JDK, which includes JRE.