簡體   English   中英

從Java命令行在MacOS上啟動Eclipse

[英]Start Eclipse on MacOS from Java Command line

我正在使用舊版本的Eclipse Helios SR1。

我需要能夠從終端啟動Eclipse。

評論http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F

我在終端中執行以下命令以啟動Eclipse。

/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -jar plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar

我得到

根異常:java.lang.NoClassDefFoundError:org / eclipse / swt / SWTError

因此,這似乎比上述鏈接中的復雜。 如果我雙擊Eclipse.app,它將立即啟動。

我想知道還需要做些什么才能使命令行Eclipse啟動器正常工作

您應該只能夠使用open命令:

open /path/to/eclipse.app

要么

open -n /path/to/eclipse.app

即使一個新的Eclipse實例已經在運行,它也會打開它。

如果必須使用Java命令,則需要在-jar選項之前指定-XstartOnFirstThread

java -XstartOnFirstThread -jar ...

使用Eclipse啟動器二進制文件:

<Your-Install-Path>/Eclipse.app/Contents/MacOS/eclipse

默認的啟動選項在eclipse.ini中設置:

<Your-Install-Path>/Eclipse.app/Contents/Eclipse/eclipse.ini

開普勒的啟動選項記錄在這里: https ://help.eclipse.org/kepler/index.jsp ?topic= /org.eclipse.platform.doc.isv/reference/misc/runtime- options.html (Helios鏈接重定向到開普勒,這是他們保留的最古老的開普勒)

此處詳細說明了啟動過程: https : //help.eclipse.org/2019-03/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/launcher.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM