In order to use DLLs and any platform specific operation in java, you can use JNI (Java Native Interface).
Here is some usefull resources about JNI and calling Windows APIs from Java.
http://www.kbalertz.com/kb_222092.aspx
http://java.sun.com/docs/books/tutorial/native1.1/
http://community.borland.com/article/0,1410,20679,00.html