I program windows applications using Java and this builds a \".jar\" file not an \".exe\" file. When a client computer with no java runtime installed opens the \".jar\" file
A small applet in a html page which cancels a redirect to a "Please install Java" page.
EDIT: This is almost the only really bullet-proof way. Any registry key containing JavaSoft is most likely only for the Sun JVM and not any other (like IBM or BEA).