Revision: 5622
          http://jnode.svn.sourceforge.net/jnode/?rev=5622&view=rev
Author:   fduminy
Date:     2009-07-29 19:09:34 +0000 (Wed, 29 Jul 2009)

Log Message:
-----------
updated to check that JAVA_HOME is set and that %JAVA_HOME%\bin\java.exe exists
some credits given to GriffenJBS

Modified Paths:
--------------
    trunk/build.bat

Modified: trunk/build.bat
===================================================================
--- trunk/build.bat     2009-07-29 12:01:12 UTC (rev 5621)
+++ trunk/build.bat     2009-07-29 19:09:34 UTC (rev 5622)
@@ -1,3 +1,23 @@
 @echo off
-setlocal
+
+if ("%JAVA_HOME%") == ("") GOTO ERROR1
+echo JAVA_HOME is set to "%JAVA_HOME%"
+
+if NOT EXIST "%JAVA_HOME%\bin\java.exe" GOTO ERROR2
 "%JAVA_HOME%\bin\java" -Xmx768M -Xms256M -jar core\lib\ant-launcher.jar -lib 
"%JAVA_HOME%\lib" -lib core\lib -f all\build.xml %*
+GOTO :END
+
+:ERROR1
+echo ERROR: JAVA_HOME is not set.
+GOTO :HELP
+
+:ERROR2
+echo ERROR: JAVA_HOME is set to a wrong value, was expecting 
"%JAVA_HOME%\bin\java.exe" to exist.
+GOTO :HELP
+
+:HELP
+echo A typical java home is C:\Program Files\Java\jdk1.6.0 (or 'jdk1.6.1' ...)
+pause
+GOTO :END
+
+:END


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jnode-svn-commits mailing list
Jnode-svn-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jnode-svn-commits

Reply via email to