2 # Copyright (c) 2003-2006 by nexB, Inc. http://www.nexb.com/ - All rights reserved.
3 # This software is licensed under the terms of the Open Software License version 2.1.
4 # A copy of the license is available at http://opensource.org/licenses/osl-2.1.php
6 # Usage: Use anteclipse like you would use Ant from the command line.
7 # See http://ant.apache.org/manual/running.html for more details
8 # You must define environment variables:
9 # JAVA_HOME: pointing to your JDK installation
10 # ECLIPSE_HOME: pointing to your Eclipse installation
12 # Customize those values based on your local machine capacity
13 JAVA_OPTS="-Xms768M -Xmx1024M"
16 # Setting the windowing system and providing a workspace help avoiding problems
17 if [ $OS == 'Darwin' ]; then
18 ECLIPSE_OPTS="-ws carbon -data /tmp/ws"
19 elif [ $OS == 'Linux' ]; then
20 # TODO: verify right options for Linux
21 ECLIPSE_OPTS="-data /tmp/ws"
23 echo Operating System not supported: $OS
27 if ! [ -d "$ECLIPSE_HOME" ]; then
28 echo No ECLIPSE_HOME environment variable defined.
32 if ! [ -d "$JAVA_HOME" ]; then
33 echo No JAVA_HOME environment variable defined.
37 $JAVA_HOME/bin/java $JAVA_OPTS -cp "$ECLIPSE_HOME/startup.jar" org.eclipse.core.launcher.Main $ECLIPSE_OPTS -application org.eclipse.ant.core.antRunner "$@"