Reputation: 451
I use the below bash script for building an Eclipse workspace from command line. I haven't figured out how to build a specific project within the workspace though...how would I do that?
#!/bin/sh
echo Eclipse path: ${ECLIPSE}
echo Eclipse workspace path: ${ECLIPSE_WORKSPACE}
stdout=$("${ECLIPSE}/eclipsec" -nosplash -application org.eclipse.jdt.apt.core.aptBuild -data "${ECLIPSE_WORKSPACE}" 2>/dev/null)
echo ${stdout}
if [[ ${stdout} == *error* ]]
then
exit 1
fi
exit 0
Upvotes: 5
Views: 2382
Reputation: 55527
It's been a long time since you have asked this question but I saw it in the "unanswered" section of StackOverflow.
I see your making a Bash script in Linux and here is how I figured this out one day while configuring my eclipse.ini:
While running Eclipse, open a Terminal and run:
ps aux | grep eclipse
This will give you an output such as:
/usr/bin/java -XX:MaxPermSize=256m -jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /usr/lib/eclipse/eclipse -name Eclipse --launcher.library /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist/eclipse_1407.so -startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar --launcher.overrideVmargs ... and so on
That is the exact process and its arguments. You can test this by copying and pasting it in the Terminal and running it yourself. The extra arguments are stored in the eclipse.ini. For more information on configuring the eclipse.ini for your script you can check out the following: What are the best JVM settings for Eclipse?
Upvotes: 4