You need to have JDK already installed and gotta pick two documents in metalink for a clean How to XDK install (including JDK)
Download XDK from otn and untar it a location and use xdkload shell script install XDK. Those scripts K shell permissions/environment settings screwed up. I have tried latest one hich released on 03/31/03. You have to use cshell to load XDK.