Hello Hans, thanks for your fast reply.
I understand the reasons which make a .exe wrapper like Launch4J necessary, and support that. Therefore I wanted to analize myself the Gradle Launch4J configuration, maybe try other settings, etc, but I couldn't find the Launch4J configuration file (something like "config.xml" mentioned under http://launch4j.sourceforge.net/docs.html ) neither in the source distribution, nor in Subversion repository. Wanting to switch to 0.4 Gralde *TODAY*, I finally hacked up a tiny .CMD script (I hate .BAT, and Win9x is obsolete), inpired by the Un*x script from the bin directory. It's small and stupid, but why do more than necessary? Here it is, maybe someone else could use it too: (Note that last line might be wrapped by email program) ========================================= @echo off setlocal title Gradle if ""=="%JAVA_HOME%" ( echo ERROR: missing JAVA_HOME environment variable set PARAM_ERROR=true ) if ""=="%GRADLE_HOME%" ( echo ERROR: missing GRADLE_HOME environment variable set PARAM_ERROR=true ) if "true"=="%PARAM_ERROR%" ( goto :EOF ) set JAVACMD=%JAVA_HOME%\bin\java set TOOLSJAR=%JAVA_HOME%\lib\tools.jar set CP=%GRADLE_HOME%\lib\gradle-0.4.jar;%CLASSPATH% set STARTER_MAIN_CLASS=org.gradle.BootstrapMain %JAVACMD% %GRADLE_OPTS% -classpath %CP% -Dgradle.home=%GRADLE_HOME% -Dtools.jar=%TOOLSJAR% %STARTER_MAIN_CLASS% %* ============================================ Regards, Victor On Mon, Oct 6, 2008 at 3:07 PM, Hans Dockter <[EMAIL PROTECTED]> wrote: > Hi Victor, > > On Oct 6, 2008, at 2:26 PM, Victor Ott wrote: > >> Hello everyone, >> >> as far as I can see the isue is that launch4j doesn't recognize at all >> neither JRE 6, nor JDK 5, as being available. Here my first trying >> with Gradle 0.4 (jumping up from 0.2)(please note that I'm setting >> both PATH and JAVA_HOME): >> >> ====== Active JRE: >> D:\java\tools\gradle\gradle\bin>java -version >> java version "1.6.0_05" >> Java(TM) SE Runtime Environment (build 1.6.0_05-b13) >> Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing) >> >> ====== Gradle says: >> D:\java\tools\gradle\gradle\bin>gradle -v >> Launch4j: This application requires a Java Runtime Environment 1.5.0 >> >> ====== Add JDK 1.5 to path: >> D:\java\tools\gradle\gradle\bin>setjava 15 >> >> Setting JAVA variables: >> JDK... >> GRADLE... >> GROOVY... >> ANT... >> Add to path: >> .;d:\java\jdk15\bin;d:\java\tools\gradle\gradle\bin;d:\java\tools\groovy\groovy\bin;d:\java\tools\ant\ant\bin >> JAVA_HOME = d:\java\jdk15 >> ANT_HOME = d:\java\tools\ant\ant >> TOMCAT_HOME = d:\java\tools\tomcat\apache-tomcat-6 >> CATALINA_HOME = d:\java\tools\tomcat\apache-tomcat-6 >> GROOVY_HOME = d:\java\tools\groovy\groovy >> WEBTEST_HOME = d:\java\tools\webtest\build >> GRADLE_HOME = d:\java\tools\gradle\gradle >> >> ====== Gradle says: >> D:\java\tools\gradle\gradle\bin>gradle -v >> Launch4j: This application requires a Java Runtime Environment 1.5.0 >> >> >> Cygwin only for Gradle is a bit too much. > > This is just a work around and can't be a final solution. > >> Therefore, current Gradle >> 0.4 packaging seems to be unusable in Windows. > > Not necessarily unusable but possibly unusable (unless you use cygwin), > which is bad enough. > > The question is what to do about this. > > The major reason why we have switched to launch4j is that gradle.exe returns > a non zero value in case of a build failure. With a .bat file this is not > possible. ant.bat or maven.bat return always 0. The return value issue is a > big problem when Gradle is used by a ci server running on windows. With a > .bat every build is successful even if it fails. The other reason were > issues with spaces in the paths. Last but not least, maintaining a bat file > is one of the ugliest things I ever had to do as software developer. > > On the launch4j mailing list there are a couple of postings asking how to > specify the JDK. None of the postings is answered. I gonna try to contact > the author directly. If this does not work out, I guess we have to provide a > bat file again in 0.5. > > - Hans --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
