Eclipse command line build

匿名 (未验证) 提交于 2019-12-03 01:20:02

问题:

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 

回答1:

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:

  1. While running Eclipse, open a Terminal and run:

    ps aux | grep eclipse 
  2. 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 
  3. 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?



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!