How do I integrate HSM encryption with JAVA?
In JAVA you can just use JCE/JCA. Ask your provider for the implementation, you will need some jar files, and you're ready.
All HSM should support common API interfaces, such as PKCS11, JCE or MSCAPI. For Java integration, they would offers JCE CSP provider as well. Simply configure the provider, and they you can use the Keystore/KeyGenerator as per normal.