Monthly Archives: June 2009

Retrieving the Process ID (PID) in Java

Sometimes it is necessary for a Java application to retrieve it’s own process id. An example of where this could be required is for logging/debugging purposes. Below is a simple “Java way” (there are other ways to discover the process … Continue reading

Posted in Java | Tagged , | Leave a comment

GWT-Ext Date-Picker widget – Change the start of week

The GWT-Ext Date-Picker widget (the Calendar widget that allows for selection of a date) by default shows the starting day of a week as Sunday.  Moreover, there is no API provided to change it to any other day.  E.g. in one … Continue reading

Posted in GWT-Ext | Tagged , , , | 1 Comment

BigDecimal and “java.lang.ArithmeticException: Non-terminating decimal expansion”

In one of my recent projects, I had to use java.math.BigDecimal to divide two values. I had to use BigDecimal instead of double as this was a financial application and required the results to be accurate. However, after running the … Continue reading

Posted in Java | Tagged , | 54 Comments