Dump Classes and Functions from a Jar

I on a regular basis find me in the situation were I need to find out which jar exactly exposes a class or function.

For years I’ve been using:

# for f in *.jar ; do
echo ===== $f
strings | grep "function"

Which kind of works, but it does actually not dump all the function names.

So after a bit of research I came up with:

for f in *.jar ; do 
    jar tf $f | while read fl ; do 
        cl=$(echo $fl | sed 's/\//./g'); 
        c=${cl%.*} ;
        javap -classpath $f $c; 

This will produce output like;



Compiled from "ServerSessionPool.java"
public interface javax.jms.ServerSessionPool {
 public abstract javax.jms.ServerSession getServerSession() throws javax.jms.JMSException;
Compiled from "Session.java"
public interface javax.jms.Session extends java.lang.Runnable {
 public static final int AUTO_ACKNOWLEDGE;
 public static final int CLIENT_ACKNOWLEDGE;
 public static final int DUPS_OK_ACKNOWLEDGE;
 public static final int SESSION_TRANSACTED;
 public abstract javax.jms.BytesMessage createBytesMessage() throws javax.jms.JMSException;
 public abstract javax.jms.MapMessage createMapMessage() throws javax.jms.JMSException;
 public abstract javax.jms.Message createMessage() throws javax.jms.JMSException;
 public abstract javax.jms.ObjectMessage createObjectMessage() throws javax.jms.JMSException;
 public abstract javax.jms.ObjectMessage createObjectMessage(java.io.Serializable) throws javax.jms.JMSException;


See perfect way to find that elusive class/function.



Missing your Facebook contacts in Adium?

There is a problem with the protocol Adium used to implement the Facebook Chat, which means that some people have problems seeing their contact (they are not there…).

As of Adium 1.4.2 this will be fixed as Adium is moving to the new protocol – or they say they are.

As per this wiki page do:

  • in preferences, remove the facebook “account”.
  • add a “Jabber” account (as opposed to a Facebook account).
  • type in your Facebook username, followed by @chat.facebook.com, for examples “JoeBob@chat.facebook.com”. You’ll need to activate your username in the account preferences (Account ? Account Settings ? Username) of your Facebook account, using the website. (I did not have to do this)
  • set the connection server to “chat.facebook.com”, on the options pane.

And you should see all your Facebook contacts in Adium again.

Dumb Drivers

Dump Drivers, well I spend on average 25.000km on the road every year and am starting to get the understanding that the general traffic law have been disabled or rendered invalid for about 40% of everyone who walk, bicycle, drive a mopet, motorbike, car, or a truck.

As I’m currently is a resident of The Netherlands, my general rant is pointed towards people of the origin of that country, not saying that things aren’t any different anywhere else, but that is for other people to comment on.

Some of my issues with people in general are:


  • red light actually mean that you should not cross the street
  • do not walk in the middle of the street, that is unhealthy


  • still this thing with red light is still a small issue
  • these white things on the road which look like shark teeth actually mean that you should not drive out in front of an oncoming vehicle
  • there is also a reason why it is a good thing to have lights on when it’s dark, other people could not care less if you can’t see where you’re going, but it’s really nice to see that you’re there
  • pedestrian only streets, actually mean pedestrian only streets. Not bicycles, and pedestrians
  • bicycles are not allowed to drive beside each other… you’re taking up space which is meant to be used for other important things, like me


  • they should all be banned…


  • you’re not Valentino Rossi!!!
  • you’re not Valentino Rossi!!!
  • you’re not Valentino Rossi!!!
  • you’re not Valentino Rossi!!!
  • and no your new 120db exhaust does not sound great at 3am
  • be my guest kill yourself by driving like a madman, but do it somewhere else

car drivers:

  • you might be intelligent enough to get a license, but that does not mean that you should drive a car (very common in The Netherlands, where the common IQ for car drivers must be close to 0
  • you know that there is a reason why cars have indicators
  • you should then also know that it’s polite to use these indicators
  • and when you finally get around to use the indicators, then use them more than once
  • changing lanes on the motorway, is actually the same as entering a road (like an intersection), other traffic have right of way, and remember the indicators
  • overtaking on the right is not allowed!!!
  • there might be an option to drive in the right lane… MOVE!!
  • motorway speed is more than 50km/h
  • and no you cannot break in corners, it’s stupid, and it’s dangerous
  • red light means STOP!
  • please do not enter an crossing if you cannot clear it before red light…

truck drivers:

  • no, you cannot overtake that other truck within reasonable time…….
  • try not to push other people of the road when you decide to change lane…. POLISH idiots!!

What amazes me the most is that people actually are not embarrassed but there misconduct in the traffic, it’s like everyone is allowed to do as they fell like. Someone told me some years ago that the Dutch have two national sports, one of them being football (which they are not very good at, looking at the results from the last world champion ship), and the other one being behaving like idiots in the traffic.

There is a television program; “Weg Misbruikers”, where they show all the stupid things people do while commanding a motor vehicle – the scary thing most of the people being stopped think it’s very funny – what’s wrong with people….

The Germans have a saying about the Dutch: “schwartzer schrift auf gelber rand belief gefern und bleib gesund”, which more or less means that if you see a car with Dutch numberplates make sure to seek cover, otherwise you might be in trouble.

I also sometimes do silly things, but in general I do my absolutely best to follow the law, that way one does not have to worry about the policy… and if something happens it’s not my fault.

MiniDVR h720 from DogCam Sport

It’s unhealthy to have an addiction to gadgets (to the economy that is). I’ve been using a GoPro Hero Wide a few time last year, but was really annoyed by the way it was operated – on/off on the front, and there isn’t any good way to see if it’s recording or not.

I’ve spend most of the winter researching what the best (and cheapest) replacement would be; having the following requirements:

  • need a remote (wired please)
  • need to be able to charge it while riding (and recording)
  • have a separate camera (recorder and camera head)
  • should be able to use 8GB or more SD cards (GoPro never released the promised firmware upgrade to use 4GB cards)

I would liked to have had a Chasecam PDR100, but there is a replacement coming out shortly, and as it’s not the cheapest option, I’ve decided to wait for with that one.

Then looking at the stuff Dogcam Sport have I decided to go for the MiniDVR h720 package, and as it’s been shitty weather I’ve not had the chance to try it out until now.


MINI HDVR Test from Casper Pedersen on Vimeo.

Now what are the pro and cons in my eyes (as this is not a perfect package):


  • can use up to 16GB Micro SD cards
  • have a charger (on the bike)
  • have a remote (wired)
  • quality is ok for the price
  • cheap (249.95 gbp)


  • it uses Micro SD cards, which are small and flimsy
  • the remote is no a lanc remote which means that it’s not possible to extend the cable
  • it uses MP4 (h264), which means that the videos are not iMovie compatible, they needs conversion which affects the quality (big minus)
  • there is a microphone on the cable to the camera, I could live without that as I’m using the internal mic only.

Well I’ve figured out that Final Cut Express can deal with the movie’s directly, which means that I’ve yet another piece of software to sort out.

Accessing BBC iPlayer from abroad

One of the most anyoing things with BBC iPlayer is that it’s not possible to access it if you are not situated in the UK – fully understandable as UK residents pay license to watch BBC, but then again I also do, indirectly as my cable company rob me for a fair amount of money every month to allow me to watch BBC 1 & 2.

There are currently three way to get access to iPlayer if you are not in the UK;

  • Get a VPN connection, but that will cost money. Currently the price is around 7 – 11 € per month
  • Find a free HTTP proxy which might work, and it might not
  • Find another way, and use anonymous networks like TOR Network

I have tried the first two, and where the VPN solution works, I do not want to send all my internet traffic through a VPN tunnel, and finding a free proxy can be daunting, and they might not be up when I feel like watching TV.

Therefor TOR is probably the nicest way to get this working.

        1) Download the latest client from


        , if you use OSX 10.6 (Snow Leopard) you need to get


        (update 04/02/10: latest is


        (update 28/08/10: latest is
        2) Install the client, and start it
        3) After you have started it (we just need it to create some default files), stop it again.


        4) find ‘torrc’, on OSX it will be in ~/Library/Vidalia and add the following two lines to it:

StrictExitNodes 1
exitnodes anonion,anotherlink,colinwillsdorkyahoo

(update 28/08/10: looks like there have been some changes to the exitnodes, the ones currently working for me are):
ExitNodes F00DD00D,devasdfasdf,EverylckleBit,Unamed,


        5) create a

browser auto-proxy

        file (PAC).

function FindProxyForURL(url, host) {
if (shExpMatch(url, "*.bbc.co.uk/iplayer*") ||
shExpMatch(url, "*.bbc.co.uk/mediaselector*")) {
return "SOCKS localhost:9050";
} else {
return "DIRECT";
} }

        Call it ‘iplayer.pac’ and save it somewhere on your harddrive.
        6) In your browser (OSX is differnt as it uses a system wide proxy setup) preferences change the proxy to use the file create 5).

With OSX (that is Safari, 3rd party browsers have their own settings) you need to do; System Preferences -> Network -> Advanced -> Proxies -> Check ‘Automatic Proxy Configuration’ -> Select the file.

        7) Point your browser to


      and it should tell you that you’re connected via TOR.

Now you shold be able to access the iPlayer website…

I used most to the information from Cherie Hurwitz’s blog to get this working, but instead of FoxProxy I find that a PAC file is easier to work with.

Update 28/08/2010
Looks like there have been some changes to the exitnods. The ones which are currently working for me are:
ExitNodes F00DD00D,devasdfasdf,EverylckleBit,Unamed,ben,DestroyTerrorismNow,deusexmachina

Update 04/04/2011
Currently working exitnodes: st0nerhenge,Alice,DynoTor,F00DD00D

(followup III) Leopard Annoyances – Apache/PHP

Back in February 2008 I wrote about my unhappyness about Apples inability to build a usefull PHP for Leopard (OSX 10.5), which forced more or less everyone who would be using PHP on Leopard to use a 3rd party build. And as far as I remember this was also the case with Tiger.

Now finally after years of waiting Apple have finally decided to compile PHP with GD (graphics manipulation library), enabled.

GD Support => enabled
GD Version => bundled (2.0.34 compatible)
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.2.37
WBMP Support => enabled
XBM Support => enabled

One can say that Apple actually delivers, but why did it have to take years…..

Google Street View

So it does not matter weather you like it or not, I personally do not really know what to think of it – but Google Street View is here to stay.

But now there is a change for you to make sure that you’re now where close to where they take pictures (if you don’t like being on the photos), or show up and make silly things, which people will have to look at for years.

Google have for that purpose created a website which shows where the photo cars are right now.

Now should one make a competition, to encourage people to do silly things??? (I’m in no doubt that Google’s legal department isn’t going to like that)