In this series of tutorials, we will take a detailed look at the Apache Maven tool. In this particular post we will go through some introductory concepts related to Maven. So lets get started with the Quick Start Guide to Maven.
In this tutorial we will see how to write PDF file in Java using iText library. Review the code listed below. Running this program will generate a PDF file at location c:/itext.pdf. You can change the location in the program to suit your platform:
iText is a free and open source PDF library (License Type: AGPL) for Java. It is unarguably the best and most efficient PDF library currently available for Java. Adding PDF support to your application for functionalities like reporting can be an excellent idea given that PDF is a well accepted format and easy to share. […]
If you have recently installed Java 7, chances are that you might be facing errors using the brand new features of Java 7. This is because of Eclipse Java 7 compliance issue of the compiler. Follow the steps listed below to fix these errors and run programs using new features of Java in eclipse.
In the pre Java 7 world, you would handle exceptions by writing separate catch blocks for different types of exceptions that can occur in the try block. In case of related exception, the derived class exception are listed above the base class exception, e.g. FileNotFoundException should be listed above IOException since former is derived from […]
In the pre Java 7 world, you would typically acquire and use resources inside a try block, handle exceptions in the catch block(s) and release the resources in the finally block. The finally block is always executed irrespective of whether exceptions occur or not. The Java 7 try with resources statement eliminates the need for […]
Java 7 switch String support should have been added long way back! It was first requested 17 years ago!! Until the previous version it supported variables and expressions which resolved into int, byte, short or char only. But now with the addition of String support, it will surely save a lot of complex if-else structures […]