--- config_office/oowintool
+++ config_office/oowintool
@@ -206,7 +206,9 @@
 
 sub print_jdk_dir()
 {
-    my $dir = reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.4/JavaHome");
+    my $dir =
+	  reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.5/JavaHome") ||
+	  reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.4/JavaHome");
     print cygpath($dir, 'w', $output_format); 
 }
 
