jLuger.de - Blog

Finding infite loops in Java
2011-08-10

In Fixing memory leaks in Java I've introduced tools to find memory leaks. Recently I had the problem that some conditions caused a infinite loop in a Java program when I couldn't connect the debugger to it. So I've searched for a way to get some inside on what is happening and found jstack.
more


14. Java Forum Stuttgart
2011-07-08

Yesterday I was at the 14. Java Forum Stuttgart in (surprise) Stuttgart, Germany.  It was organized by the java user group stuttgart. They did a great job. You could attend seven talks and choose each time between six different ones making up 42 talks in total. There was also a lobby where exhibitors showed their products or presented them as possible employers. Around that they offered coffee, non-alcoholics, snacks and lunch for free. All that for a modest price of 150 EUR (including tax).
more


Screen scraping with selenium
2011-07-06

I have to admit that I was once forced to get a Myspace account and I've also used it. Well until they made a redesign and all my friends moved to Facebook. A lot of other people did the same and now Myspace was sold. This screamed for a cleaning session to my account. The photos were easy as I had them all in high quality on my hard drive. The real problem were the mails. There is no export button for them. Coincidentally I wanted to test Selenium for screen scraping to aggregate the content of some other sites. So this seemed to be the perfect test project.
more


Custom javadoc
2011-06-19

In the current JavaMagazin is an article about SOPlets. There the mention the principle of Single Source of Truth (SSoT) where every information is only stored at one place. I liked the idea because it seems avoids redundancy which makes maintenance difficult. On the other side I've feared that it will be difficult to implement. Well, right a few days after reading the article I was confronted with SSoT in one of my projects. I had to create a documentation of our database schema for a privacy policy review. Of course we had done an extensive documentation but it was in the javadoc of our JPA POJOs.
more


Found on the web: Hamcrest
2011-03-30

Do you feel sometimes limited with the assert statment that JUnit offers? Well I was and while I wanted to check that two char arrays are different I've found a cool new feature of JUnit: Hamcrest. See how you could check that two arrays are different:
more


A simple standalone HTTP server with jetty
2011-03-08

Have you ever wanted create a simple HTTP-Server for playing around, presenting small data or doing some other stuff? Well, jetty offers the possibility to be embedded into your own project. They even have a pretty nice tutorial at http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty. There is sample code and they explain what it is doing but there are no information what jars you need.
more


AES key length in Java 6
2011-03-06

As you may know Java offers the possibility to encrypt data with AES. Unfortunately the default JDK in Java 6 limits the key size to 128 bit. To use the 192 or 256 bit keys you must install the JCE Unlimited Strength Jurisdiction Policy Files in the JDK that runs your application. Using an alternative provider from bouncycastle.org doesn't help. When sticking to the JCE API the JDK needs the patch. So it seems that you can either force your users to install the patch or abandon the standardized API and use a proprietary one. When your key is derived from a password there is a third way.
more


Use correct client software to test your server
2011-03-02

I'm currently experimenting a little bit with a webdav framework. The result is a webdav server where you can create directories (files need to be implemented). After implementing the delete function I've found out that renaming is a copy and delete. This doesn't seem like a good idea but I have to do some more research before changing the framework. So for the beginning I've decided to live with it and to do a first test. It failed with an error message.
more


Update on how to catch unhandled exceptions
2011-03-01

On 2011-02-24 I've written about how to catch unhandled exceptions. I have to admit that the blog entry was based on my observations with a test program. When implementing the solution into the real application, testing showed that it isn't working for threads outside the EDT. An exception in such a thread will still kill the application.
more


Fixing memory leaks in Java
2011-02-28

The last days at the office I've spent hunting a memory leak in a Java Swing Client. Here I want to describe the experiences I've made.
more



PreviousNewer