- Wednesday, July 28, 2010, 18:41
- How-To, J2EE, Java
- 1,774 views
While using Maven as build tool in our project, I found it very difficult to create a Dynamic Web Project which supports
Maven dependencies and can execute in Eclipse! I have seen lot of people using Maven just as build tool and for local setup uses jar files in some /lib directory. I wanted to remove this dependencies on local /lib for jar files ...
Full story
- Monday, July 12, 2010, 20:54
- How-To, Java
- 951 views
As a Java developer, lot of times I have to play around with file system. Sometimes I have to copy files/directories from one location to another; sometimes have to process certain files depending on certain pattern. In one of my test program, I wanted to calculate available disk space using Java. Lot of code snippets are ...
Full story
- Friday, July 9, 2010, 9:00
- How-To, Java
- 1,678 views
Here is a small but very useful tip that every Java programmer should be aware of. Have you ever tried sorting arrays in Java? Well, java.util.Arrays class has built in method to make your job easy. You can use following method to sort any array in Java.
import java.util.Arrays;
...
...
Arrays.sort (int )
Arrays.sort (float )
Arrays.sort (long )
...
Let us check an example were we will sort an array of ...
Full story
- Friday, June 18, 2010, 18:25
- How-To, Java
- 774 views
If you are using Eclipse as your primary development IDE, then you may want to know about Code templates in Eclipse. Code templates are certain user defined (some are available by default) templates which can assist in rapid code writing. Not only code templates increase your code writing speed, but it also add consistency across the code.
To add a code template, all you need to ...
Full story
- Friday, February 19, 2010, 20:33
- How-To, Java
- 1,504 views
Ever wanted to hide all those closed projects in eclipse? Well, here is a simple trick that you may not know already.
Imagine your Eclipse workspace is filled with many projects that you created in past just to test some small functionality. Now you are done with these projects and hence you have closed it. Eclipse by default show all the closed projects in Project ...
Full story
- Monday, February 15, 2010, 11:00
- Java
- 5,998 views
iText is a wonderful library if you want to generate PDFs in Java. It comes with a huge set of API to create/manage a PDF file. We already saw in our previous tutorial
how to generate a pdf file in itext and also
how to merge ...
Full story
- Wednesday, February 10, 2010, 15:12
- Java
- 14,774 views
Quote 1: Avoid creating unnecessary objects and always prefer to do Lazy Initialization
Object creation in Java is one of the most expensive operation in terms of memory utilization and performance impact. It is thus advisable to create or initialize an object only when it is required in the code.
public class Countries {
private List countries;
public ...
Full story
- Friday, January 22, 2010, 3:14
- Java, News
- 1,323 views
The European Commission on Thursday approved Oracle Corp.'s acquisition of Sun Microsystems after regulators were assuaged over the fate of an open-source database, James Gosling have paid respect to Sun Microsystem on his
blog. Please go to his blog and pay your respect to Sun.
Full story
- Friday, December 11, 2009, 15:41
- Java
- 683 views
Synopsis
This note deals with AMQP, and some implementations, especially Qpid and ActiveMQ.
Introduction
AMQP stands for Advanced Messaging Queuing Protocol. It is a standard for cross platform messaging. It is a wire protocol and aims to enable functional compatibility between clients (from various platforms) and messaging brokers.
It is pretty comprehensive and aims to cover all distributed business scenarios. ...
Full story
- Thursday, December 10, 2009, 15:31
- Java
- 1,568 views
Synopsis
This note describes a few simple commands on how to view the RAM and CPU usage of your Java process. It provides brief pointers on how to identify the influencing parameters and how to tweak it.
Memory
Java Heap
The heap size of your Java process can be controlled by using a combination of –Xmx and –Xms.
The heap size ...
Full story