3 [[ -z ${JAVA_HOME} ]] && echo "Need to set JAVA_HOME environment variable" && exit -1;
4 [[ ! -x ${JAVA_HOME}/bin/java ]] && echo "Cannot find an executable \
5 JVM at path ${JAVA_HOME}/bin/java check your JAVA_HOME" && exit -1;
9 if [[ "$unamestr" == 'Linux' ]]; then
11 elif [[ "$unamestr" == 'Darwin' ]]; then
15 if [[ $platform == 'linux' ]]; then
16 fullpath=`readlink -f $0`
17 elif [[ $platform == 'osx' ]]; then
19 cd `dirname $TARGET_FILE`
20 TARGET_FILE=`basename $TARGET_FILE`
22 # Iterate down a (possible) chain of symlinks
23 while [ -L "$TARGET_FILE" ]
25 TARGET_FILE=`readlink $TARGET_FILE`
26 cd `dirname $TARGET_FILE`
27 TARGET_FILE=`basename $TARGET_FILE`
30 # Compute the canonicalized name by finding the physical path
31 # for the directory we're in and appending the target file.
33 RESULT=$PHYS_DIR/$TARGET_FILE
37 basedir=`dirname ${fullpath}`
39 ########################################
40 # Now add to classpath the OSGi JAR
41 ########################################
42 CLASSPATH=${basedir}/lib/org.eclipse.osgi-3.8.1.v20120830-144521.jar
43 FWCLASSPATH=file:${basedir}/lib/org.eclipse.osgi-3.8.1.v20120830-144521.jar
45 ########################################
46 # Now add the extensions
47 ########################################
49 # Extension 1: this is used to be able to convert all the
50 # bundleresouce: URL in file: so packages that are not OSGi ready can
51 # still work. Notably this is the case for spring classes
52 CLASSPATH=${CLASSPATH}:${basedir}/lib/org.eclipse.virgo.kernel.equinox.extensions-3.6.0.RELEASE.jar
53 FWCLASSPATH=${FWCLASSPATH},file:${basedir}/lib/org.eclipse.virgo.kernel.equinox.extensions-3.6.0.RELEASE.jar
55 ########################################
56 # Now add the launcher
57 ########################################
58 CLASSPATH=${CLASSPATH}:${basedir}/lib/org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar
59 FWCLASSPATH=${FWCLASSPATH},file:${basedir}/lib/org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar
61 $JAVA_HOME/bin/java $@ \
62 -Djava.io.tmpdir=${basedir}/work/tmp \
63 -Dosgi.install.area=${basedir} \
64 -Dosgi.configuration.area=${basedir}/configuration \
65 -Dosgi.frameworkClassPath=${FWCLASSPATH} \
66 -Dosgi.framework=file:${basedir}/lib/org.eclipse.osgi-3.8.1.v20120830-144521.jar \
67 -classpath ${CLASSPATH} \
68 org.eclipse.equinox.launcher.Main \