ShortTip: JavaPackage class

I wanted to get the Java package from a Java source file, and created this simple class. Be aware, that it can not distinguish a real package from a block-commented package (yet). Use it like this: File file = new File(””); System.out.println(”Package is: ” + JavaPackage.parse(file).toString());

Short tip: StringUtils class in Java

Goodies like explode, leftback, rightback, switchcase, implode, middle, trim, unique etc. can be found in this utility class. I’ve updated the source since it contained an error in the explode(String, String) method. Thanks goes to Julian for notifying me! I am now using the split algorithm from Stephen Ostermiller’s StringHelper The Commons Lang project at […]

Short tip: NumberUtils class in Java

This class contains only one method, random(int low, int high), that generates a random number between the specified low and high. In JDK 1.2, there is a built in method for this in the java.util.Random class, but not in 1.1.8…

Short tip: CollectionUtils class in Java

The link to the actual source pointed to the wrong source, but Julian made me aware of the problem. The link has been corrected. This utility class contains static methods that help managing collections (Vectors and arrays) in JDK 1.1.8. Well known @formulas like trim, unique and implode are some of the more interesting methods. […]

Short tip: System.getProperties() in Notes 5.0.11

These are the default Properties that exists in Lotus Notes 5.0.11 (why someone would need them is explained in the future), and can be retrieved with the static System.getProperties() method:, https, notes browser.applet=true browser.vendor.applet=true browser.vendor=Lotus Development browser.version.applet=true browser.version=5.0 browser=Lotus Notes file.encoding=Cp1252 file.separator.applet=true firewallSet=false http.agent=JDK/1.0.2 java.class.version.applet=true java.vendor.applet=true java.vendor.url.applet=true java.version.applet=true […]

Blog 2003-03-01 14:18:40

Dungeon Master was one of my favourite games on the Amiga, and I found out that there is a Java clone of it! It works almost exactly as the original, and I am amazed that there is people that can put their time on such things like creating a game that is quite obsolete today. […]