Eclipse命令行构建

5
我使用以下bash脚本从命令行构建Eclipse工作区。但是,我还没有弄清如何在工作区内构建特定项目...我该怎么做?
#!/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个回答

4

虽然你已经问了这个问题很久了,但我在StackOverflow的“未回答”部分看到了它。

我看到你正在Linux中制作Bash脚本,以下是我一天在配置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?

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接