Eclipse 這套開發工具,已經是末日黃花了嗎?

會有這樣的感觸,其實是因為最近在準備一個客戶家裡開發環境安裝的工作,而這個客戶的開發環境是完全沒辦法「即時」連線到 internet 的,因此所有的安裝都必須在離線的狀況底下完成。

會有這樣的感觸,其實是因為最近在準備一個客戶家裡開發環境安裝的工作,而這個客戶的開發環境是完全沒辦法「即時」連線到 internet 的,因此所有的安裝都必須在離線的狀況底下完成。

這個時候挑戰就來了,因為在大部分的情況下,我們都是在有 internet 的環境底下工作的,所以安裝各種軟體(以及更新),也大多都是在「無感」的狀況下完成的。

來看看這次要做的事情,然後從這件事情的過程,探討 Eclipse 這套開發工具,是否已是末日黃花;因為主要是要協助客戶開始使用 WebSphere Liberty 進行開發,所以我也一併的驗證了以下組合:

  • Eclipse + WebSphere Application Server Developer Tools and Liberty Developer Tools(這裡要特別注意不是 Liberty Tools 這個設計上不同的 Plugin)
  • Intellij + Liberty Tools
  • VS Code + Liberty Tools

驗證完之後,再加上這幾年自己在使用上的經驗,以及觀察到的現象,只能說 Eclipse 這個開發工具,真的是已經步入黃昏階段了。讓我們先來看看比較表吧!

開發工具與 Plugin 名稱Eclipse + WebSphere Application Server Developer Tools and Liberty Developer ToolsIntellij + Liberty ToolsVS Code + Liberty Tools
Plugin 檔案大小812MB39.5MB17.8MB

看完比較表,先來看 Eclipse 的部分,在 IBM Support 的內容裡提到,目前 WebSphere Application Server Developer Tools and Liberty Developer Tools 適用於 Eclipse 202309 的版本,所以我就先下載 Eclipse 202309 的 Eclipse IDE for Enterprise Java and Web Developers。

同樣的在 IBM Support 內容裡有提到,如果要「完整的」離線安裝,必須要進行 Eclipse p2 Repository Mirroring 的工作,所以在這一點上面,Eclipse 就已經輸給 Intellij 以及 VS Code 了,因為後兩者不需要額外做這些麻煩的事情,它們只需要在它們的 MarketPlace 將 Plugin 下載就可以完整的離線安裝了,不需要這麼多麻煩的事情。

而且以 IBM Support 所建議的 Eclipse 網址的內容,去執行 p2 Repository Mirroring 的話,其實我在感覺上也不是很順利,因為你會不知道整個 Mirroring 是否有完整的做完。

特別注意 artifact 以及 metadata 都要完成下載,Eclipse 才能正確認得這些內容。

這個執行方法,會在背景運作(如下圖所示),其實很難知道工作有沒有完成;以我家裡的下載速度來跑,大概要半個小時的時間才能下載完畢。

後來上網查了一下資料,有一個比較可以清楚看到 Mirroring 結果的方式,推薦給大家:

eclipsec.exe -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/2023-09_comp/ -destination file:/c://20240320/
eclipsec.exe -verbose -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/2023-09_comp/ -destination file:/c://20240320/

上面這兩段命令,會讓 Eclipse process 在 foreground 執行(如下圖所示),也可以清楚地看到 terminal 畫面有不斷在透過網路抓取資料的 log,相較於第一段 Eclipse 網址所介紹的在背景執行方式,會讓人比較安心一點;其實說穿了就是因為下載的檔案很大,時間要很長,所以更會想要知道是否有持續的在進行下載工作,如果檔案很小一下子就載完的話,就不會特別去在乎這些事情了。

Mirroring 完畢,就可以「完整的」離線安裝了嗎?當然不是,如果有這麼順利的話,也就不用特別寫這份紀錄了;在繼續探討 Eclipse p2 Repository Mirroring 這個題目之前,我們先看看 Eclipse/Intellij/VS Code 如果要「完整的」離線安裝 WebSphere 相關的 Plugin,所需要下載的檔案大小:

  • Eclipse:最後會達 1GB 以上
  • Intellij:39.5MB
  • VS Code:17.8MB

所以在「所需下載檔案大小」這個題目上,Eclipse 是大輸 Intellij 以及 VS Code 的;Intellij 以及 VS Code 的離線檔案下載網址,則可以參考我在 WebSphere Liberty Tools update!! 這篇當中提到的網址去下載。

Intellij 可以順利的完成離線安裝(安裝時都有停掉網路):

VS Code 可以順利的完成離線安裝(安裝時都有停掉網路):

接著看末日黃花 Eclipse,當我們完成 https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/2023-09_comp/ 這個網址的 Eclipse p2 Repository Mirroring 後,在 Eclipse 裡選擇 Install New Software:

可以看到除了 WebSphere 之外,有一大堆不相干的 Plugin。但如果不做 p2 Repository Mirroring 的話,光是直接下載 Update Site 又無法離線完成安裝,真的是很困擾。

我們來看看這個 p2 Repository 可以安裝哪些 Plugin:

從上面兩張圖可以看到,IBM WebSphere Application Server Migration Toolkit 以及部份的 WebSphere Application Server Developer Tools 是可以直接離線安裝的,但如果要一併安裝 OSGi Application Development Tools 以及 WebSphere Application Server V8.5/9.0 Tools 的話,就得要再額外做另外一個 p2 Repository Mirroring,主要是這些 Plugin 會需要 Eclipse webtools 的更新,而這些更新並沒有在 Eclipse 202309 這個版本裡面。

如果硬是要離線安裝的話,會出現下面這個錯誤:

要建立 Eclipse webtools 的 p2 Repository Mirroring,可以使用以下的命令:

eclipsec.exe -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://download.eclipse.org/webtools/repository/2023-09/ -destination "file:/c://IBM Liberty Developer Tools-23.2"
eclipsec.exe -verbose -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://download.eclipse.org/webtools/repository/2023-09/ -destination "file:/c://IBM Liberty Developer Tools-23.2"

可以將下載路徑指定到和先前下載 Liberty Plugin 一樣的位置,這樣會方便許多;在下載完 Eclipse webtools 的 p2 Repository 之後,整個目錄已經突破 1GB 的空間…

不過是可以順利的將剩下的三個 Plugin 都安裝上去就是了。

Eclipse 這個開發工具,在我大學跟研究所時期(記得是 2001 年的時候)是由 IBM 內部開發,主要目標是為了發展在 VisualAge for Java 下一代的 Java IDE,在還沒有開放原始碼之前,它叫做 WebSphere Studio Application Developer;等到了開放原始碼之後,才有了 Eclipse 這個名字,我一直覺得 Eclipse 這個名字很壞,中文意思叫做「日蝕」,而那時也有一間公司就叫做 Sun Microsystem 啊…

從這個 Plugin 安裝的過程可以看到,這套開發工具已經變得非常的笨重,雖然說對於 Java Developer 還是相當的方便,但已經在某些地方出現劣勢,如:JavaScript 的新語法支援還是很差,這個對於 Fullstack Java Developer 來說是很麻煩的事情,所以我現在常常都是 Eclipse 以及 VS Code 混著用的狀況,或許在不久的將來,我會完全改用 VS Code 也說不定…

markkwsu

markkwsu

Add comment

Highlight option

Turn on the "highlight" option for any widget, to get an alternative styling like this. You can change the colors for highlighted widgets in the theme options. See more examples below.

Instagram

Instagram has returned empty data. Please authorize your Instagram account in the plugin settings .

Categories count color

Advertisement

Small ads

Flickr

  • obscurité
  • Sergio
  • cellule
  • jasmin de mer
  • le baobab
  • plastique invasif
  • grenades
  • evasion
  • wilson

Social Widget

Collaboratively harness market-driven processes whereas resource-leveling internal or "organic" sources.

ThemeForest