JDK1.5 - More painful bugs aka Enumeration-Woes: Solved!August 29th, 2004 Current Status: Solved
Defect:
When more than one annotation type files are compiled in javac(any of the ways like *.java or @srclist or FileName1.java FileName2.java)
then it emits and error message that it cannot find symbol for statically imported Enums. However statically importing one level up and de-referencing works.
Guide To Simplified Java Logging using Java Core APIJanuary 17th, 2006 Java comes in with a handy logging package (java.util.logging) which eliminates the need to use external logging packages like Log4J. However it still requires some configuration which makes it cumbersome and repetitive to include in every class.
Writing Obfuscated Code Using Java Generics Part 1November 14th, 2005 Let's begin with a simple example for this installment. import java.util.Collection;
public class TestType {
public static <Collection> Collection myMethod(Collection a) {
return a;
}
public static void main(String ...
Understanding Java: Simplified Hello World for Socket ProgrammingApril 15th, 2006 In my experience much of the complexities a newcomer faces in the Java world is understanding extraneous stuff like handling exceptions or formatting data etc. Today I was requested for the nth time (n -> infinity) how to write a simple socket client and server (actually debug one).
9 Important Tips for Selenium Remote Control (Java client) - Test ToolApril 16th, 2008 Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in many programming languages against any HTTP website using any mainstream JavaScript-enabled browser. Selenium RC is a powerful and simple framework for running (scheduled or manually) automated UI centric regression tests for web applications / services.
Java Application Security Through Static AnalysisJune 28th, 2008 Extendable (by plugins, ...) Static Analysis tools like FindBugs can enhance the security of your Java applications (web as well as standalone or client-servers applications) in several significant ways. Enforcing security policy compliance
Security policies are espoused by security experts such as OWASP and mandated for compliance by many regulations such as Sarbanes-Oxley that require organizations to demonstrate they have done "due diligence" in safeguarding application security and information privacy.
How to close all connections in HSQLDB (also prevents a locking defect)March 5th, 2005 I have noticed that despite closing all connections and exiting a standalone HSQLDB database, at least one connection still remains open. The defect is manifested in HSQLDB 1.7.3 and HSQLDB 1.8.0 RC 8.
Top 10 Java LiesMarch 6th, 2006 Here are the top ten Java lies I have heard over the years. Feel free to add yours in the comments.
Free Java Utility To Touch Files (Cross Platform)September 23rd, 2006 This is a simple commandline Java utility which I wrote down in under 5 minutes to help in checking-in (svn commit) over 500 files which were modified but the dates weren't changed due to an error in our settings. So subversion failed to recognize it.
How To Communicate Between Java AppletsOctober 22nd, 2007 Communication between Java applets has been an interesting topic from the early days of Java. There are several esoteric ways to communicate like using Javascript as a bridge.
Java Framework Struts is Dead; Long Live Struts!November 29th, 2005 With the merger of WebWork and Struts now it is crystal clear that our beloved (not to speak bad about the dead) java web framework is no more with us. It's parts will however be salvaged and added to WebWork.
Calculate PI To Arbitrary Precision (Sample Java Code)November 13th, 2007 Sample Java code to calculate PI to arbitrary precision. This uses Machin's formula: pi/4 = 4*arctan(1/5) - arctan(1/239).
How To Handle Exceptions From Static Code Block in JavaJuly 6th, 2006 Exception can be handled when thrown in a method by either passing through the Exception or handling it. However in a static code block how can you handle checked exceptions meaningfully?
Normally static blocks are used to execute a code only once globally (for all instances of the class).
Java Software Platform J2SE6 (Mustang) Enables System Tray / TaskbarNovember 26th, 2005 Java 2 Platform Standard Edition 6.0 version (Mustang) lets you access the system tray through two classes in the java.awt package: SystemTray and TrayIcon. These classes give you the ability to add graphics, popup menus, and floating tip functionality to the system tray.
Microsoft Teaching Java Using Eclipse at JavaOne 2008May 8th, 2008 I was amazed to find Microsoft design engineer Mugunthan Mugundan teaching Java (how to create REST output using Java) using Eclipse IDE. I found it rich in irony at many levels.