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

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

Eclipse (64-bit) 軟體圖示 Eclipse (64-bit) 4.25 (64-bit) 資料更新 2022-09-16 閱讀約 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.25-win32-x86_64.zip · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

New features in the Platform and Equinox:
Views, Dialogs and Toolbar:
Less usage of icons in user confirmation dialogs:
- Multiple dialogs have been updated to not contain a question icon if they ask the user for a decision to align with the UI guidelines existing for the operating systems. For example, if you close an edited file, the resulting dialog will not show a help icon anymore. Also MessageDialogs methods will not show a question icon anymore for question / confirmation dialogs.

Text Editors:
Preference to enable word wrap by default:
- A new preference has been added in the General > Editors > Text Editors page to specify that 'word wrap' should be enabled by default when opening text editors. This preference is disabled by default.

Preference to enable word wrap by default:
- A new preference has been added in the General > Editors > Text Editors page to specify that 'word wrap' should be enabled by default when opening text editors. This preference is disabled by default.

Themes and Styling:
Forms have updated default background color:
- The background color of UI toolkit forms has been updated, as blue gradients are not very common now in user interfaces. This will affect all form based user interfaces which do not use styling. You can see the new behavior in the Eclipse IDE when theming is turned off via the preferences.

Selected tab in CTabFolder is now highlighted:
- The selected tab in a CTabFolder now has a highlight bar to more easily identify the the current selection

Debug:
System encoding for Console:
- A new launch configuration attribute is added to allow processes start with the system encoding. As a result, Java processes can start without specifying explicit "-Dfile.encoding=" option and JVM will use the system defaults defined by the user environment

Support for ANSI escape codes in Console:
- The Console interprets ANSI escape codes to produce styled output
- It supports 16 colors / 256 colors / true-colors for foreground and background, color palettes, and attributes like bold, italic, underline, invert, conceal, strike, crossed-out, framed
- Only "CSI n m" (SGR, Select Graphic Rendition) control sequences are supported
- They set display attributes, but cannot be used to change the content of the output (erase actions, cursor positioning, scrolling)
- Non-SGR sequences are not interpreted, but are recognized and hidden, so you will not see them
- This functionality is available for all the text output to the standard output or standard error. It works for Java, C/C++, Perl, Python, shell, Groovy, Maven or any Eclipse supported language.
- Preferences are available under Preferences > Run/Debug > Console > ANSI Support

New features for Java developers:
JUnit:
Test Suite wizard supports JUnit 5:
- The New JUnit Test Suite Wizard has been enhanced to now allow the creation of a JUnit 5 test suite using the @Suite annotation. To open the New JUnit Test Suite Wizard for the current package, go to New > Other > Java > JUnit > JUnit Test Suite.

Java Editor:
Convert while loops to enhanced for loops:
- The clean-up to convert to enhanced 'for' loops where possible has been enhanced to convert eligible while statements that use an iterator into enhanced for loops. The current clean-up already supports converting 'for' loops using an iterator into an enhanced 'for' loop.
- To apply the cleanup, select the Java 5 Convert to enhanced 'for' loops checkbox on the Java Feature tab in your cleanup profile

Convert to switch expression:
- The clean-up to convert to a switch expression where possible has been enhanced to recognize switch statements that have every case either end in a return statement or a throw of an exception. In such a case the switch statement is converted into a return of a switch expression.
- To apply the cleanup, select the Java 14 Convert to switch expression where possible checkbox on the Java Feature tab in your cleanup profile

Debug:
- Double click in "All References and "All Instances" pop-up to navigate to Type Previously, clicking on any of the shown items in the "All References" and "All Instances" popup wasn't acted upon. This is now improved - if the selected variable or field type's source code is available, the editor tries to open it, and navigate to the declaration.

New APIs in the Platform and Equinox:
Platform Changes:
- MessageDialog not using icons for user facing dialogs. The org.eclipse.jface.dialogs.MessageDialog has been updated to not use icons for user facing dialogs of type QUESTION, QUESTION_WITH_CANCEL and CONFIRM to align with the UI guidelines regarding such dialogs for the various operating systems.

SWT Changes:
Configure highlight bar thickness on CTabFolder:
- The CTabFolder now has a new API setSelectionBarThickness(int thickness) that allows to set the thickness of the highlight bar in the selected tab
- By default a highlight bar is now drawn in the selected tab. You can switch to the old look without highlight bar by using CTabFolder#setSelectionBarThickness(0).

Set custom text for MessageBox's buttons:
- The MessageBox now has a new API setButtonLabels(Map<Integer, String> labels) that allows to configure the text on the buttons

New features for plug-in developers:
General Updates:
Default target platform ships different 3rd party bundles:
- Some 3rd-party bundles (JUnit, some Apache commons, ASM...) have changed as they are now originating from Maven Central instead of Eclipse Orbit. They sometimes provide slightly different capabilities so some remediation may be necessary if you're using the default target plaform. See the documentation for details about possible issues and remediation.
- Support for the OSGi Bundle and Versioning Annotations:PDE now supports the OSGi Bundle and OSGi Versioning annotations to be used in a Plugin Project