這是歷史版本頁面 — 看 Eclipse (64-bit) 最新版本

寫 Java 用哪套 IDE?Eclipse 能解決什麼

Eclipse (64-bit) 軟體圖示 Eclipse (64-bit) 4.22 (64-bit) 資料更新 2021-12-09 閱讀約 5 分鐘

你剛開始學 Java,或換了新電腦準備寫點東西。你已經裝了 JDK,打開記事本或純文字編輯器,寫完程式碼,卻在命令提示字元裡編譯、執行,一錯就是一堆看不懂的訊息。你想找一個能幫你寫程式、抓錯誤、跑結果的工具,但網路上搜「Java IDE」出現一堆名字,不知道哪個才適合自己。

一般人的做法是直接抓一個編輯器來用,但純文字編輯器不會幫你檢查語法,也不會提示你哪裡少了分號。另一種做法是問朋友用什麼,但每個人的需求不同,別人的工具不見得適合你。這類整合開發環境(IDE)的切入點,是把編輯、編譯、執行、除錯這些步驟整合在同一個視窗裡,讓你把注意力放在寫程式本身,而不是處理工具鏈的細節。

01Eclipse 到底能做什麼?

Eclipse 是一套整合開發環境,主要用途是寫 Java 程式。它把程式碼編輯、編譯、執行、除錯都放在同一個介面裡,你寫完程式可以直接按執行,不用另外開命令提示字元。它也提供語法檢查、自動補齊、程式碼範本這些功能,寫到一半有錯會即時標出來。

02這套軟體要怎麼安裝?

到 Eclipse 官方網站下載壓縮檔,解壓縮到你喜歡的資料夾,執行裡面的執行檔就能啟動。第一次啟動時它會問你要把專案和設定存在哪個目錄,選一個你記得的位置就可以了。不需要另外執行安裝程式,也不用管理者權限。

03除了 Java,它還能寫其他程式語言嗎?

可以,但要透過安裝外掛(plugin)來擴充。Eclipse 本身以 Java 開發為主,官方文件提到它支援 C/C++、Python、PHP 等語言,前提是你去裝對應的外掛。如果你只寫 Java,預設就夠用;要寫其他語言,得先確認外掛的支援狀況。

04寫程式時有哪些輔助功能?

它有程式碼自動補齊,你打一半它會跳出建議;有語法即時檢查,寫錯會馬上標紅線;還有程式碼範本,可以快速插入常用的程式片段。這些功能在官方說明裡都有提到,目的是讓你寫程式時少打錯字、少漏符號。

05除錯功能是怎麼運作的?

你可以在程式碼行號旁邊點一下設中斷點,然後用除錯模式執行,程式會停在你設的位置,讓你看變數目前的值、一步一步往下走。官方說明裡有提到內建除錯器、中斷點、逐步執行和變數檢視這些功能,對找邏輯錯誤很有幫助。

06初學者適合用這套軟體嗎?

適合,但要有心理準備。Eclipse 功能很多,介面一開始會覺得複雜,不過你只需要會開專案、寫程式、按執行這三個動作就能開始。它的自動補齊和語法檢查對初學者很有用,可以少犯很多低級錯誤。只是介面是英文的,不習慣英文介面的人會需要一點時間適應。

07團隊開發或學校作業用這套可以嗎?

可以。它內建整合 Git、SVN 這些版本控制系統,可以讓團隊一起管理程式碼。學校作業如果要求繳交專案,Eclipse 的專案結構也符合常見的 Java 專案格式。不過要跟同學協作,還是要另外學版本控制的操作方式,Eclipse 只是提供介面。

08我的電腦是 Windows 7,可以跑嗎?

可以。官方支援系統包含 Windows 7 64 位元、Windows 8 64 位元、Windows 10 64 位元和 Windows 11。不過要注意,它只支援 64 位元系統,如果你的 Windows 7 是 32 位元版本,就無法安裝。

09我只是偶爾寫個小程式,有需要用到這套嗎?

如果你的需求只是寫個幾十行的練習程式,用線上編輯器或純文字編輯器加命令提示字元也能完成。Eclipse 的啟動速度不算快,記憶體也吃不少,對偶爾寫小程式的人來說,光是等它開啟可能就覺得麻煩。這種情況你可以先試試更輕量的工具。

10我不習慣英文介面,有中文可以切換嗎?

官方介面語系是英文,沒有內建中文。雖然可以透過安裝中文化外掛來改成中文介面,但外掛的品質和維護狀況不一,而且 Eclipse 的官方文件、論壇討論大多也是英文。如果你完全無法接受英文介面,可能要考慮其他有官方中文支援的 IDE。

11這套軟體跟 NetBeans 比起來,哪個比較多人用?

以評分人數來看,NetBeans 有 702 人評分,Eclipse 有 286 人評分,Visual Studio Express 有 384 人評分。評分人數多不代表比較好,但可以反映使用者的基數。Eclipse 以外掛生態聞名,NetBeans 則以開箱即用著稱,你可以都裝來試試看,選一個順手的。

12這套軟體還在持續更新嗎?

是,它仍然在維護中。官方版本紀錄顯示近 12 個月有 4 次更新,近 24 個月有 8 次更新,代表開發團隊還有在持續釋出新版本。如果你在意軟體有沒有在維護,這點可以放心。

下載與官方連結

前往官方網站 下載 Eclipse (64-bit)

eclipse-SDK-4.22-win32-x86_64.zip · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

New features in the platform and equinox:
Views, Dialogs and Toolbar:
External browser used by default:
- By default the Eclipse IDE will open the default system browser instead of the internal browser. You can change this setting via Windows -> Preferences -> General -> Web Browser.

Launch Configuration View:
- The new Launch Configuration View allows quick access to all your launch configurations without the need to enter the launch dialogs
- You can launch (run, debug, profile, etc.) as well as terminate and/or relaunch running configurations directly from the view
- The view also provides API which allows third party contributions to hook into the view and provide "launchables"

Double click on Problem without File shows in default view:
- Double click on Problems executes "Go to Resource". But there are cases where no File (column "Path") is associated with the Problem. In those cases "Go to Resources" cannot be executed. Instead the default "Show In" action is now executed. This default depends on the perspective.

Text Editors:
Multiple text selection:
- Support for multiple selection has been added to Text Editors. Multi selections allow most edit operations (text replacement or insertion, extend selection to next word or to next line, copy/paste...) to apply simultaneously on all ranges.

Multiple strategies are available to enable multi-selections:
- Turn a block selection into a multi-selection using the To multi-selection command,
- Add a caret with Alt+Click,
- Use the new Select All button on the Find/Replace dialog

Themes and Styling:
Windows dark theme styles title bar:
- The windows title bar in the dark theme on Windows OS is now styled in the default dark theme

General Updates:
Ant 1.10.12:
- Eclipse has adopted Ant version 1.10.12

NEW FEATURES FOR JAVA DEVELOPERS:
Java™ 17 Support:
- Java 17 is out and Eclipse JDT supports Java 17 in 4.22

The release notably includes the following Java 17 features:
- JEP 306: Restore Always-Strict Floating-Point Semantics
- JEP 406: Pattern Matching for switch (Preview)
- JEP 409: Sealed Classes (Final)

JUnit:
Support execution of JUnit tests that are records:
- For Java 16 and up, JUnit tests can now be implemented as records. Right-clicking on an individual test or the record itself and selecting Run as will allow executing the test via either the JUnit Plug-in Test or JUnit Test context menu choices.

JUnit 5.8.1:
- JUnit 5.8.1 is here and Eclipse JDT has been updated to use this version

JUnit 4.13.2:
- JUnit 4.13.2 is here and Eclipse JDT has been updated to use this version

Java Editor:
Convert String concat to Text block:
- A new cleanup and quick-assist has been added to convert appropriate String concatenations into Java Text Blocks. Appropriate String concatenations must have at least 3 non-empty substrings with one per line and the Java level must be 15 or higher. Line comments for all substrings but the last line will be lost after conversion. Spaces at the end of substrings preceding the newline will result in s being substituted while substrings that do not end with newlines will have a added at the end of the line to preserve concatenation.

Surround with try-with-resources quickfix:
- A new quickfix has been created to offer Surround with try-with-resources for resource leaks and potential resource leaks when the resource in question implements AutoCloseable

Java Views and Dialogs:
Improved lambda support in the Call Hierarchy view:
- The Call Hierarchy view is enhanced with showing not only the callers of the lambda function, but the callers of the declaring function too

Paste into Open Type dialog:
- If text is pasted into the Open Type dialog then it is automatically cleaned up to the included type name by best effort

Debug:
Label Objects during debugging:
- During debugging a Java application, often we have to deal with lot's of object instances, and it's not always easy to distinguish between them. That's why the experience is improved, with the ability to set a label on individual objects.
- The heuristics support

NEW APIs IN THE PLATFORM AND EQUINOX:
Platform Changes:
New API for JFace TextViewers: IMultiTextSelection:
- JFace Text now supports a new type of ITextSelection that allows to keep track of multiple simultaneous selections or caret locations. The new interface is IMultiTextSelection.
- Most text manipulation operations are capable of working with IMultiTextSelection. Some other operations may need to be customized to handle this IMultiTextSelection more specifically.
- Enable "Select All" with IFindReplaceTargetExtension4:
- The extension interface IFindReplaceTargetExtension4 can be added to existing IFindReplaceTarget implementations in order to enable the Select All feature from the Find/Replace dialog. It consists of addition of a single setSelection(IRegion[] regions) method.
- Double click on Problem without File shows in default view:
- Double click on Problems executes "Go to Resource". But there are cases where no File (column "Path") is associated with the Problem. In those cases "Go to Resources" cannot be executed. Instead the new defaultShowIn view is opened. It is optional and can be configured per perspective using the defaultShowIn attribute.

Resource cache in Jface:
- We added a LRU cache for image resources. It can be disable with system property: org.eclipse.jface.resource.cacheSize=0
- The default cacheSize is 300.
- In the eclipse IDE it is used to atomatically cache the icons of the toolbars
- See DeviceResourceDescriptor(boolean shouldBeCached) for details

SWT Changes:
Windows dark theme styles title bar bars:
- The windows title bar in the dark theme on Windows OS is now styled
- Display.syncCall() returns a value from SWT threadDo you need a user feedback (or any value from swt widget) in a background thread from SWT thread? You can get it now even easier then using Display.syncExec()

Tree fires SWT.EmptinessChanged event:
SWT Tree widget now fires SWT.EmptinessChanged event on below two conditions:
- After first tree item addition
- On last tree item removal

Equinox p2 Changes:
- Log unsafe transport or verification technologies used at installation When installing from a repository, p2 now logs a warning in case some technologies used for the installation are considered unsafe. Here are the cases covered so far and that will trigger a logged warning:
- http repositories are used (http repositories expose to CVE-2021-41033)
- Artifact checksums are either missing, or none of the available digest algorithms is considered safe (eg md5).

NEW FEATURES FOR PLUG-IN DEVELOPERS:
Dialogs, Wizards and Views:
Model spy migrated to PDE:
- The model spy which allows to view and adjust the Eclipse application model has been integrated into PDE. You can open it via Windows > Spies > Model Spy.

CSS spy migrated to PDE:
- The CSS spy which allows to view and edit the current CSS styling of your IDE or your RCP application has been integrated into PDE. You can open it via Windows > Spies > CSS Spy.

PDE Compiler:
Quickfix for "Automatic-Module-Name header is redundant":
- A new quick-assist has been added for fixing "Automatic-Module-Name header is redundant" problem. The quickfix removes automatic module name header from the manifest file.