Archive for the ‘Java’ Category

Calculate THIS!

26. April 2010

The Apache POI project provides a free open-source library for creating, reading and manipulating Microsoft Office documents. The functionality for working with Excel files is pretty mature and is quite feature-complete.

Lately, I was confronted with a problem concerning formula evaluation. I had a pre-existing Excel template file that had some cells with placeholder texts. These texts are replaced with number values available at runtime. The result is saved as a new file. This works great with POI until a cell with a placeholder text is used within a formula of another cell. When looking at the template, Excel then obviously complains about the data type of the values used within the formula.

(more…)

A sign of obfuscation

25. March 2010

Shipping commercial software is generally more complicated than just compiling some class files and delivering them. Making software available to the public means that you want customers to use the cool new features, but you don’t want them to know how these features were implemented. Code obfuscation is unavoidable if you want to make it harder to decompile and understand your code.  Also, if you want to brand your JARs and don’t want your delivered software to be easily modifiable, then you can make use of JAR-signing which is a built-in JDK feature.

(more…)

Keep track of your Eclipse projects

19. February 2010

If your days are anything like mine – full of different activities in different areas of the software, and involving multiple tasks over the course of the day, you’ve probably wondered how to organize yourself.  I’m a fan of keeping everything in one place, and this place for me is Eclipse. Beside the excellent programming tooling support in the IDE, Eclipse also offers various means to help you keep track of your workspace resources, projects and tasks.

(more…)

Pimp my QDox

19. January 2010

QDox is a library which allows you to parse a java source file and extract instance variables, methods and even JavaDoc tags from it. Quite some time ago, I had used QDox for a little tool that generates implementation source code for java beans. When writing java bean sources, you usually have to write the same code template again and again for every single bean property. Each time, the template has to include an instance variable, a getter and a setter method and a constant for the property name.

(more…)