You will need to create the cursor first before setting
Cursor customCursor = toolkit.createCustomCursor(cursorImage, cursorHotSpot, "Cursor");
I found the following tutorial, see if that helps: http://forum.codecall.net/topic/39126-custom-cursors-using-java/