Apparently there seems to be a problem with running Java applications under the dwm window manager I switched to very recently (more information about how did I install and customize dwm according to my taste will follow in an upcoming post). At least with the ones with a GUI interface. The problem I usually encounter is that I see nothing else but a grey window after launching the application. I don't use many Java apps but one that I use quite often is JOSM a.k.a. the Java OpenStreetMap editor. As an eager OSM mapper, it is clear that I can't just simply ignore this problem. So here is a solution I found after spending some marvellous time with googling. I start JOSM using the following script:
#!/bin/sh wmname LG3D unset AWT_TOOLKIT java -jar ~/lib/josm-tested.jar
It solved the problem for me. I can't explain what it does and why does it work, but I'm very open to hear about it in the comment sections below if you do. There is another suggestion on this site:
export AWT_TOOKIT=MToolkit ./appIt did not work for me, but it might be useful for someone.