這是歷史版本頁面 — 看 Java Development Kit (64-bit) 最新版本
寫Java程式一直編譯失敗,JDK到底該不該裝
你剛開始學Java,興沖沖地裝了Eclipse或IntelliJ IDEA,照著教學影片打了第一支Hello World,按下執行卻跳出「javac不是內部或外部命令」,或者直接顯示找不到Java執行環境。你上網查,有人說要裝JDK,有人說裝JRE就夠,還有人叫你改環境變數——但你連這些名詞在講什麼都還搞不清楚,只想知道為什麼寫個程式這麼麻煩。
多數人習慣直接裝一套IDE就開始寫,但IDE本身只是編輯器,真正負責把原始碼編譯成可執行檔、提供除錯工具和執行環境的,是底層那套開發工具包。沒有它,你寫的程式碼就只是一堆文字檔。這類工具的核心工作,就是補齊從「寫完程式」到「跑得起來」之間那段看不見的基礎建設——編譯、執行、除錯、看文件,全部靠它。
01JDK和JRE到底差在哪裡,我該裝哪一個?
JDK是完整的開發環境,包含編譯器、除錯工具、函式庫和JRE;JRE只是JDK的子集,只提供執行Java程式的必要元件。如果你要寫程式、編譯原始碼,必須裝JDK;如果只是要執行別人寫好的Java程式,裝JRE就夠了。以你的情況——會寫到javac指令——需要的是JDK。
02這套軟體裝完之後,具體能幫我做到哪些事?
它提供Java編譯器,把.java原始碼轉成可在JVM上執行的位元組碼;內含JRE讓你能在本機執行Java應用程式;附帶大量函式庫和API,涵蓋資料庫存取、網路通訊、GUI開發等;還有jdb、jstack等除錯工具,以及JConsole、VisualVM等效能分析工具。另外包含完整的Java API文件,查類別和方法用法時不必另外上網。
03它跟Eclipse、IntelliJ IDEA這些IDE是什麼關係?
它本身不包含IDE,但設計上就是為了跟這些工具搭配。Eclipse、IntelliJ IDEA、NetBeans等IDE在背後呼叫JDK的編譯器和工具來完成建置與執行。你裝好JDK後,在IDE裡指定JDK路徑,IDE就能用它來編譯和執行你的程式。兩者是互補關係,不是二選一。
0464位元版本跟32位元有什麼差別,我該怎麼選?
資料中沒有針對64位元與32位元差異的詳細說明。一般來說,64位元版本能使用更大的記憶體空間,如果你的作業系統是64位元,且需要處理大型專案或大量資料,通常會選擇64位元版本。但具體支援情況和安裝需求,建議到Oracle官方網站確認你的系統相容性。
05它的除錯工具實際上是怎麼用的?
它提供jdb(Java除錯器)和jstack(執行緒堆疊分析工具)。jdb讓你在命令列中設定中斷點、逐步執行、檢視變數值,適合不習慣用IDE內建除錯器的人;jstack則用來查看JVM執行緒狀態,可以找出死結或執行緒卡住的原因。另外JConsole和VisualVM提供圖形化介面,可以監看記憶體使用量、CPU負載和執行緒狀態。
06完全沒寫過程式的新手,適合直接碰這套軟體嗎?
可以裝,但要有心理準備。資料中明確提到,設定環境變數對初學者來說有挑戰性,安裝過程也需要手動設定。如果你只是跟著教學走,照步驟設定JAVA_HOME和PATH,通常能順利完成。但如果你對命令列操作不熟悉,第一次設定環境變數可能會卡一段時間。建議先找一篇完整的安裝教學照著做。
07商業用途可以免費使用嗎?
可以免費下載和使用,但商業使用時必須遵守Oracle的授權條款。資料中強調,JDK 20之後的版本在Oracle No-Fee條款下,可以在生產環境免費使用和重新散布,但授權條款細節需要自行審閱。如果你的公司要拿它來開發商業軟體,建議讓法務或主管確認授權內容,不要直接當作完全免費。
08我只是想跑別人寫好的Java程式,不寫程式,需要裝這個嗎?
不需要。如果你不寫程式、不編譯原始碼,只需要執行Java應用程式,裝JRE就夠了。JDK包含了JRE,但體積更大、安裝更複雜。資料中明確指出JRE是JDK的子集,只提供執行所需的元件。先確認你的需求是「執行」還是「開發」,再決定要裝哪一個。
09我已經在用OpenJDK了,還需要換成這套嗎?
不一定。資料的FAQ中提到,OpenJDK、Amazon Corretto、IBM SDK for Java都是功能相近的替代方案。如果你目前的OpenJDK能正常編譯和執行你的專案,沒有必要更換。Oracle JDK和OpenJDK在核心功能上高度重疊,選擇哪一套通常取決於你對授權條款、更新頻率和技術支援的需求。
10這套軟體只有英文介面,看不懂英文的人該怎麼辦?
它的介面確實是英文,但實際使用上,你主要接觸的是命令列工具和IDE整合,不是圖形介面操作。javac、java這些指令的錯誤訊息是英文,API文件也是英文。如果你英文閱讀有困難,可以搭配中文教學網站或書籍學習,但長期寫Java程式,英文文件閱讀能力幾乎是必需的,這點要先有心理準備。
11我的電腦硬碟空間不多,裝這個會不會很佔空間?
資料中有提到,它的安裝套件相對較大,需要可觀的磁碟空間。具體需要多少空間,資料中沒有提供數字,建議到官方下載頁面查看安裝需求。如果你的硬碟空間有限,可以考慮只裝JRE(如果不需要開發),或選擇體積較小的OpenJDK發行版。安裝前先確認剩餘空間,避免裝到一半失敗。
12我朋友說用Android Studio寫Java也行,那我還需要另外裝這個嗎?
ndroid Studio本身是開發Android應用程式的IDE,它會綁定或要求安裝特定的JDK版本。資料中將Android Studio列為功能相近的軟體,但它的定位是Android開發,不是一般Java應用程式開發。如果你要寫的是桌面或伺服器端的Java程式,Android Studio並不適合;如果你要開發Android App,那Android Studio會處理JDK的配置,通常不需要手動另外安裝。
下載與官方連結
前往官方網站 下載 Java Development Kit (64-bit)
jdk-8u131-windows-x64.exe · 198.03 MB · 連結指向軟體原廠
版本紀錄
- 2026-10-24 Java JDK 27.0.1 (64-bit) 187.56 MB
- 2026-09-15 Java JDK 27 (64-bit) 187.54 MB
- 2026-08-20 Java JDK 26.0.2.1 (64-bit) 188.75 MB
再看 5 筆
- 2026-07-22 Java JDK 26.0.2 (64-bit) 188.73 MB
- 2026-04-22 Java JDK 26.0.1 (64-bit) 188.65 MB
- 2026-03-18 Java JDK 26 (64-bit) 188.68 MB
- 2025-09-18 Java JDK 25 (64-bit) 182.25 MB
- 2025-07-16 Java JDK 24.0.2 (64-bit) 205.86 MB
這一版改了什麼
What's new in this version:
CHANGES:
MD5 added to jdk.jar.disabledAlgorithms Security property:
This JDK release introduces a new restriction on how MD5 signed JAR files are verified. If the signed JAR file uses MD5, signature verification operations will ignore the signature and treat the JAR as if it were unsigned. This can potentially occur in the following types of applications that use signed JAR files:
- Applets or Web Start Applications
- Standalone or Server Applications that are run with a SecurityManager enabled and are configured with a policy file that grants permissions based on the code signer(s) of the JAR file.
- The list of disabled algorithms is controlled via the security property, jdk.jar.disabledAlgorithms, in the java.security file. This property contains a list of disabled algorithms and key sizes for cryptographically signed JAR files.
- To check if a weak algorithm or key was used to sign a JAR file, one can use the jarsigner binary that ships with this JDK. Running "jarsigner -verify" on a JAR file signed with a weak algorithm or key will print more information about the disabled algorithm or key.
New system property to control caching for HTTP SPNEGO connection:
- A new JDK implementation specific system property to control caching for HTTP SPNEGO (Negotiate/Kerberos) connections is introduced. Caching for HTTP SPNEGO connections remains enabled by default, so if the property is not explicitly specified, there will be no behavior change.
- When connecting to an HTTP server that uses SPNEGO to negotiate authentication, and when connection and authentication with the server is successful, the authentication information will then be cached and reused for further connections to the same server. In addition, connecting to an HTTP server using SPNEGO usually involves keeping the underlying connection alive and reusing it for further requests to the same server. In some applications, it may be desirable to disable all caching for the HTTP SPNEGO (Negotiate/Kerberos) protocol in order to force requesting new authentication with each new request to the server.
With this change, we now provide a new system property that allows control of the caching policy for HTTP SPNEGO connections. If jdk.spnego.cache is defined and evaluates to false, then all caching will be disabled for HTTP SPNEGO connections. Setting this system property to false may, however, result in undesirable side effects:
- Performance of HTTP SPNEGO connections may be severely impacted as the connection will need to be re-authenticated with each new request, requiring several communication exchanges with the server.
- Credentials will need to be obtained again for each new request, which, depending on whether transparent authentication is available or not, and depending on the global Authenticator implementation, may result in a popup asking the user for credentials for every new request.
New system property to control caching for HTTP NTLM connection:
- A new JDK implementation specific system property to control caching for HTTP NTLM connection is introduced. Caching for HTTP NTLM connection remains enabled by default, so if the property is not explicitly specified, there will be no behavior change
- On some platforms, the HTTP NTLM implementation in the JDK can support transparent authentication, where the system user credentials are used at system level. When transparent authentication is not available or unsuccessful, the JDK only supports getting credentials from a global authenticator. If connection to the server is successful, the authentication information will then be cached and reused for further connections to the same server. In addition, connecting to an HTTP NTLM server usually involves keeping the underlying connection alive and reusing it for further requests to the same server. In some applications, it may be desirable to disable all caching for the HTTP NTLM protocol in order to force requesting new authentication with each new requests to the server
With this change, we now provide a new system property that allows control of the caching policy for HTTP NTLM connections. If jdk.ntlm.cache is defined and evaluates to false, then all caching will be disabled for HTTP NTLM connections. Setting this system property to false may, however, result in undesirable side effects:
- Performance of HTTP NTLM connections may be severely impacted as the connection will need to be re-authenticated with each new request, requiring several communication exchanges with the server
- Credentials will need to be obtained again for each new request, which, depending on whether transparent authentication is available or not, and depending on the global Authenticator implementation, may result in a popup asking the user for credentials for every new request
New version of VisualVM:
- VisualVM 1.3.9 was released on October 4th, 2016 and has been integrated into 8u131
BUG FIXES:
Correction of IllegalArgumentException from TLS handshake:
- A recent issue from the JDK-8173783 fix can cause issue for some TLS servers. The problem originates from an IllegalArgumentException thrown by the TLS handshaker code: java.lang.IllegalArgumentException: System property jdk.tls.namedGroups(null) contains no supported elliptic curves. The issue can arise when the server doesn't have elliptic curve cryptography support to handle an elliptic curve name extension field (if present). Users are advised to upgrade to this release. By default, JDK 7 Updates and later JDK families ship with the SunEC security provider which provides elliptic curve cryptography support. Those releases should not be impacted unless security providers are modified
DETAILED BUG FIX LIST:
- JDK-7155957: client‑libs: java.awt: closed/java/awt/MenuBar/MenuBarStress1/MenuBarStress1.java hangs on win 64 bit with jdk8
- JDK-8035568: client‑libs: java.awt: [macosx] Cursor management unification
- JDK-8079595: client‑libs: java.awt: Resizing dialog which is JWindow parent makes JVM crash
- JDK-8169589: client‑libs: java.awt: [macosx] Activating a JDialog puts to back another dialog
- JDK-8147842: client‑libs: javax.swing: IME Composition Window is displayed at incorrect location
- JDK-7167293: core‑libs: java.net: FtpURLConnection connection leak on FileNotFoundException
- JDK-8169465: core‑libs: javax.naming: Deadlock in com.sun.jndi.ldap.pool.Connections
- JDK-8133045: deploy: deployment_toolkit: java.lang.SecurityException: Failed to extract baseline.versions error
- JDK-8028538: deploy: webstart: Fedora Linux issue with jnlp‑servlet.jar demo source code license
- JDK-8170646: deploy: webstart: JNLP fails to get loaded with old javaws when multiple jres (jre9 and jre8u111) installed
- JDK-8075196: docs: guides: CosNaming's implementation doesn't comply with the specification
- JDK-8161147: hotspot: compiler: jvm crashes when ‑XX:+UseCountedLoopSafepoints is enabled
- JDK-8161993: hotspot: gc: G1 crashes if active_processor_count changes during startup
- JDK-8147910: hotspot: runtime: Cache initial active_processor_count
- JDK-8150490: hotspot: runtime: Update OS detection code to recognize Windows Server 2016
- JDK-8170888: hotspot: runtime: [linux] Experimental support for cgroup memory limits in container (ie Docker) environments
- JDK-8166208: hotspot: svc: FlightRecorderOptions settings for defaultrecording ignored.
- JDK-8161945: install: install: REGRESSION: 8u91 update of 32 bit JRE removes preferences of the 64 bit JRE
- JDK-8172932: install: install: JRE installation fails with 1603 on Windows 10 with enabled Deviceguard
- JDK-8089915: javafx: web: Input of type file doesn't honor "accept" attribute.
- JDK-8090216: javafx: web: HTMLEditor: font bold doesn't work when an indent is set
- JDK-8144263: javafx: web: [WebView, OS X] Webkit rendering artifacts with inertia scrolling
- JDK-8150982: javafx: web: Crash when calling WebEngine.print on background thread
- JDK-8164314: javafx: web: [WebView] Debug build is no longer working after JDK‑8089681
- JDK-8165098: javafx: web: WebEngine.print will attempt to print even if the printer job is complete or has an error
- JDK-8165173: javafx: web: canvas/philip/tests/2d.path.clip.empty.html fails with 8u112
- JDK-8165508: javafx: web: Incorrect Bug ID in comment for JDK-8164076
- JDK-8166231: javafx: web: use @Native annotation in web classes
- JDK-8166677: javafx: web: HTMLEditor freezes after restoring previously maximized window
- JDK-8166775: javafx: web: Audio slider works incorrectly for short files
- JDK-8166999: javafx: web: Update to newer version of WebKit
- JDK-8167098: javafx: web: Backport of JDK‑8158926 to JDK 8u mistakenly used preliminary patch
- JDK-8167100: javafx: web: Minor source diffs introduced in backports of JDK-8160837 and JDK-8163582
- JDK-8167675: javafx: web: Animated gifs are not working
- JDK-8169204: javafx: web: Need to document JSObject Call and setSlot APIs to use weak references
- JDK-8170585: javafx: web: Fix PlatformContextJava type leaking to GraphicsContext
- JDK-8170938: javafx: web: Memory leak in JavaFX WebView
- JDK-8173783: security‑libs: javax.net.ssl: IllegalArgumentException: jdk.tls.namedGroups
- JDK-6474807: security‑libs: javax.smartcardio: (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- JDK-8168774: tools: javac: Polymorhic signature method check crashes javac
- JDK-8167485: tools: visualvm: Integrate new version of Java VisualVM based on VisualVM 1.3.9 into JDK
- JDK-8167179: xml: jaxp: Make XSL generated namespace prefixes local to transformation process