Hmmm... It now works, with the JAR file placed in {zd-install-dir}/jetty/webapps/service/WEB-INF/lib, irrespective of the name of the file (i.e., whatever.jar).
The trick is to restart the zdesktop daemon, i.e. run
{zd-install-dir}/zdesktop stop
{zd-install-dir}/zdesktop start
because apparently shutting down zdesktop and restarting it does not do that.
All this under JDK 1.5.0, which is what zdesktop comes bundled with (JRE located in {zd-install-dir}/jre). Which means that you have to compile for 1.5.0, because compiling for 1.6.0 results in a java.lang.UnsupportedClassVersionError (bad version number in .class file).