TestNG requires JDK 5 or higher.

TestNG Download and installation

Download the current release version of TestNG from here, unpacking the zip distribution to get TestNG decompression file, which includes the below sub files:

  • Testng-5.14.1.jar(please add to your project directly, you may also not be able to successfully build the codes only with this jar, because TestNG official decided that the release did not include all external jar files in order to keep the size down.)
  • Doc(TestNG tutorial material).
  • Example codes.
  • Testng source codes.
  • Readme.

As a beginner, I highly recommend you start and write TestNG from example codes and docs(best materials).

For the Eclipse plug-in, we suggest using the update site:

  • For Eclipse 3.4 and above, enter
  • For Eclipse 3.3 and below, enter

Read the rest of this entry »

TestNG Tutorials

22Oct2010 In: TestNG

TestNG is a testing framework written by Java and inspired from JUnit and NUnit, it is not only inherited existing functionality from Junit as well as introducing some new innovative functionality that make it powerful, easy to use, reliable, maintainable and testable codes. TestNG is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc. we can take full advantage of TestNG from engineering to quality insurance. Read the rest of this entry »

GlassFish VS Tomcat

18Oct2010 In: Tomcat

Overview: GlassFish and Tomcat

GlassFish is the open source application server delivered by Sun Microsystems for the Java EE platform. which was originally launched by Sun in 2005. On 4 May 2006, Project GlassFish released the first version that supports the Java EE 5 specification.Currently it is avaiable for versions 3.0.1, 3.1, 3.2 and 4.0 with themes revolving around clustering, virtualization and integration with Coherence and other Oracle technologies. It is a fast, in security, production-quality, high expansibility, industry-leading Java EE containers.

Overview is free software, which under two free software licences: the Common Development and Distribution License (CDDL) and the GNU General Public License (GPL).Also commercially supported to adds an enterprise-quality app server to the options available to the open source community and builds on the foundation set by Sun Java System AppServer. Read the rest of this entry »

How Do I Make an Executable JAR File

9Oct2010 In: Core Java

What’s is Jar? it is built on the ZIP file format and have the .jar file extension and introduced to Java to describe Java binary files, it is combination of all classes and corresponding Metadata information.

A magic feature of Java2 is the ability to make a Jar file executable, It is amusing as running it just like to run windows executable program. Assuming your program is Swing GUI, now you can double click the shortcut to quick start your graphic screen.

Read the rest of this entry »

How to Download and Install Jetty

7Oct2010 In: Jetty

How to Download and Install Jetty.

Jetty Quick Start

Jetty is a full-featured, standards based, embeddable, asynchronous, enterprise scalable Java components. This tutorial provides a quick instructions for downloading, installing, and running the binary version of Jetty 6.

  1. Download Jetty

    Jetty Available Distribution is from Codehaus and Eclipse, currently the latest Jetty version is 6.1.25. You can download it from either one of the following links: Read the rest of this entry »

Jetty VS Tomcat Overview

Jetty and Tomcat are open servlet containers, both of them support HTTP server, HTTP client and javax.servlet container. In this article, we will quick view the difference between Jetty and Tomcat, and give the generic idea about which is the better one.

You may think it is not make sense to compare the two containers, tomcat is the one clearly discussed moreover than jetty, it supports a lot of wonderful options to developers, this is no doubt we start using tomcat throughout development because it’s easy-going and free, Its an foremost free application server and provided full web server functionality and can be stripped down to be embedded or built up an full J2EE server.

Read the rest of this entry »

Setting up Jetty JNDI Datasource Binding

4Oct2010 In: Jetty

This tutorial is to set up Jetty JNDI datasource for DBCP(Connection pooling), at beginning, please copy Mysql driver library(we used MYSQL as  database) and required DBCP jars to the directory “lib” of the jetty rootDir. 3 main DBCP jars are required as below. Read the rest of this entry »

This tutorial look at how to use ant to create a Jar MANIFEST.MF file, as Prerequisites, please download Ant( and install it.

JAR file is a file format based on the popular ZIP file format and is used to aggregate many files into one, a JAR file is a essential zip file that contains an optional META-INF directory, the MANIFEST file is one single component of Jar file, under META-INF directory and used to describe all associated metadata of Jar file.

The MANIFEST file is represented as so-called “name: value” pairs inspired by the RFC822 standard, we also call these pairs headers or attributes, binary data of any form is represented as base64. Continuations are required for binary data which causes line length to exceed 72 bytes. Here is an example content of MANIFEST file:
Read the rest of this entry »

CXF Spring Support

22Sep2010 In: Web Services

CXF Overview

CXF has been taken full advantage of JAX-WS and Spring 2.x XML. In previous chapter, we share Web Services hello world example with CXF,  today we look at how to create and publish CXF web service with spring. You will learn the following items:

  • Set up how to code Web service with CXF
  • Publish a JAX-WS service and client with spring supported

Read the rest of this entry »


21Sep2010 In: Best Practice

Why did I choose a strange name like “ScrumMaster” for the person who facilitates Scrum projects? Why didn’t I continue to use the standard title “project manager”? I wanted highlight the extent to which the responsibilities of the ScrumMaster are different from those of a traditional project manager. This difference in terminology is symbolic of a drastic change managers must make to their approach if they are to effectively manage Scrum projects. Read the rest of this entry »