Index: bin/_jrubyvars.bat
===================================================================
--- bin/_jrubyvars.bat	(revision 6295)
+++ bin/_jrubyvars.bat	(working copy)
@@ -15,7 +15,11 @@
 rem ----- Verify and Set Required Environment Variables -----------------------
 
 if not "%JAVA_HOME%" == "" goto gotJava
-echo You must set JAVA_HOME to point at your Java Development Kit installation
+
+for %%P in (%PATH%) do if exist %%P\java.exe set JAVA_HOME=%%P..\
+if not "%JAVA_HOME%" == "" goto gotJava
+
+echo You must set JAVA_HOME to point at your Java Development Kit installation or put Java in your PATH.  Java could not be found, exiting.
 goto cleanup
 :gotJava
 
