@echo OFF @rem Copyright (c) 2003-2006 by nexB, Inc. http://www.nexb.com/ - All rights reserved. @rem This software is licensed under the terms of the Open Software License version 2.1. @rem A copy of the license is available at http://opensource.org/licenses/osl-2.1.php @rem Usage: Use anteclipse like you would use Ant from the command line. @rem See http://ant.apache.org/manual/running.html for more details @rem You must define environment variables: @rem JAVA_HOME: pointing to your JDK installation @rem ECLIPSE_HOME: pointing to your Eclipse installation. @rem If the ECLIPSE_HOME variable is not defined the script will try to infer a location @rem Customize those values based on your local machine capacity SET VM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=192m SET ECLIPSE_JAVA="%JAVA_HOME%\bin\java" @rem =============================================== @rem Borrowed from Groovy @ codehaus.org @rem Use explicit find.exe to prevent cygwin and others find.exe from being used set FIND_EXE="find.exe" if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe" if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe" @rem =============================================== :geteclipsefromenv @rem This clever handling of env vars is copied from Tomcat... if not "%ECLIPSE_HOME%" == "" goto gotEclipseHome echo The ECLIPSE_HOME environment variable is not defined correctly echo This environment variable is needed to run this program echo Attempting to guess an eclipse installation... rem =============================================== :geteclipsefrompde rem Find a platform ainstall pointer in Eclipse own pde prefs rem This file in the workspace: .metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.pde.core.prefs rem contains the path to the platform as rem platform_path=c\:\\ec-312\\eclipse set PDE_PREF_PATH="..\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.pde.core.prefs" if not exist "%PDE_PREF_PATH%" goto noeclipseinpde rem splits each line at the "=" and returns the right part, that is the second token for /F "tokens=1* delims==" %%A IN ('TYPE %PDE_PREF_PATH% ^| %FIND_EXE% "platform_path"') DO set FOUND_PDEECLIPSE=%%B rem removes extra \ for /F "tokens=1* delims=:\" %%A IN ('echo %FOUND_PDEECLIPSE%') DO set CORRECTED_PDEECLIPSE=%%A:\%%B rem removes quotes set CORRECTED_PDEECLIPSE=%CORRECTED_PDEECLIPSE:"=% set ECLIPSE_HOME=%CORRECTED_PDEECLIPSE% echo An Eclipse installation was found at %ECLIPSE_HOME% if not "%ECLIPSE_HOME%" == "" goto gotEclipseHome :noeclipseinpde echo No Eclipse installation found in PDE prefs: abandoning... goto end :gotEclipseHome if exist "%ECLIPSE_HOME%\eclipse.exe" goto okHome echo The ECLIPSE_HOME environment variable does not point to a valid Eclipse installation echo Unable to find %ECLIPSE_HOME%\eclipse.exe echo This environment variable is needed to run this program goto end :okHome rem This clever handling of arguments is copied from Ant itself @ apache.org... rem Slurp the command line arguments. This loop allows for an unlimited number rem of arguments (up to the command line limit, anyway). set ECLIPSE_ANT_CMD_LINE_ARGS=%1 if ""%1""=="""" goto nextInit shift :setupArgs if ""%1""=="""" goto nextInit set ECLIPSE_ANT_CMD_LINE_ARGS=%ECLIPSE_ANT_CMD_LINE_ARGS% %1 shift goto setupArgs :nextInit goto start :start %ECLIPSE_JAVA% %VM_ARGS% -cp %ECLIPSE_HOME%\startup.jar org.eclipse.core.launcher.Main -vm %ECLIPSE_JAVA% -application org.eclipse.ant.core.antRunner %ECLIPSE_ANT_CMD_LINE_ARGS% :end rem @echo on