Commons Daemon 1.0.1

To building on version >= 4.10 you have to patch configure:

+++
--- configure	2005-05-17 13:00:45 +0200
+++ configure.freebsd	2005-05-17 17:02:16 +0200
@@ -2404,7 +2404,7 @@
     CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN -Kthread"
     LDFLAGS="-Kthread $LDFLAGS -ldl"
     ;;
-  freebsd4.?)
+  freebsd*)
     CFLAGS="$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread"
     LDFLAGS="-pthread $LDFLAGS"
     supported_os="freebsd"
+++

You also may have to set LD_LIBRARY_PATH and export it:

LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386/client:$JAVA_HOME/jre/lib/i386
export LD_LIBRARY_PATH