I believe everyone starts (and even continues to do so) implementing Singleton pattern in following fashion: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 package com.singleton; public class SimpleSingleton { private static SimpleSingleton simpleSingleton; private SimpleSingleton() { }; public static SimpleSingleton getInstance() { if (simpleSingleton == [...]
Author Archives | JavaBeat
What is Remote Debugging in Java?
December 3, 2010
Introduction Consider a scenario where you can’t run the application in your development environment, e.g. say your application can run only on a server machine (because it is dependent on some third party interface that are not accessible in your development machine) and you have to resolve a problem (bug). What you can do? The [...]
Runtime.addShutdownHook()
November 20, 2010
Preface Every Java Program can attach a shutdown hook to JVM, i.e. piece of instructions that JVM should execute before going down. Problem A program may require to execute some pieces of instructions when application goes down. An application may go down because of several reasons: Because all of its threads have completed execution Because [...]
Java 7.0
July 27, 2010
Java 7.0 (Dolphin) Sun is releasing weekly early access snapshots of the complete source, binaries and documentation for JDK 7. These raw snapshot releases let you review and contribute to the Java SE platform as it is being developed. Some possible language changes being considered for Dolphin include: property support (for getFoo()/setFoo() pattern) method references [...]
Java 5.0
July 27, 2010
Java 5.0 Java Platform, Standard Edition (also known as Java 2 Platform) lets you develop and deploy Java applications on desktops and servers, as well as today’s demanding Embedded and Real-Time environments. Java SE includes classes that support the development of Java Web Services and provides the foundation for Java Platform, Enterprise Edition (Java EE). [...]
Java 6.0
July 27, 2010
About Java 6.0(Mustang) Java Platform, Standard Edition (also known as Java 2 Platform) lets you develop and deploy Java applications on desktops and servers, as well as today’s demanding Embedded and Real-Time environments. Java SE includes classes that support the development of Java Web Services and provides the foundation for Java Platform, Enterprise Edition (Java [...]
Console Support in Java 6.0
July 27, 2010
Introduction The coolest feature in Java 6.0 is IO Support. One of the most popular feature requests for J2SE in recent times has been the request to improve console support and provide a way to enter passwords with echo disabled. Java.io One new class is provided: Console – Contains methods to access a character-based console [...]
Static Code Analysis Tool – FireBugs
March 5, 2010
What is FireBugs? FindBugs is an open source program created by William Pugh which looks for bugs in Java code. It uses static analysis to identify hundreds of different potential types of errors in Java programs. FindBugs operates on Java bytecode,rather than source code. The software is distributed as a stand-alone GUI application. There are [...]
Job Schedulers – UNIX
February 5, 2010
Job Schedulers – UNIX We might have worked on various Job Scheduling Frameworks, one of the famous one that comes to our mind is Quartz. Yes quartz is a cool frameworks which has advanced error handling, job scheduling and various other great feature. Recently while trying to create a scheduling task for a task in [...]
java.lang.OutOfMemoryError: PermGen space
January 31, 2010
We encountered the dreaded java.lang.OutOfMemoryError: PermGen space error What does it means - Permgen Space is the space where the class files are all loaded for the first time and there after they are loaded or referenced from there. This error means there is a hell lot of duplicate classes being loaded and not all are being unloaded. [...]






December 3, 2010
0 Comments