這是歷史版本頁面 — 看 Java Runtime Environment (32-bit) 最新版本

Java Runtime Environment 是做什麼的?為什麼有些軟體一定要裝它

Java Runtime Environment (32-bit) 軟體圖示 Java Runtime Environment (32-bit) 151 (32-bit) 資料更新 2017-10-18 閱讀約 6 分鐘

打開某個老遊戲、公司內部系統、或是某個下載來的程式,畫面跳出一串「需要 Java」的提示,但你根本不知道那是什麼。裝了怕佔空間,不裝又跑不動,卡在「到底要不要裝」的猶豫裡。這種情況通常發生在你想開一個特定程式或網站,卻被一個沒聽過的執行環境擋在門外。

一般人遇到這種提示,直覺是上網找「Java 下載」,裝完發現問題解決了,但過一陣子又跳出「需要更新」,然後開始擔心是不是裝到病毒。這類執行環境工具的本質,是提供一個讓 Java 程式能跑的底層平台——它不是應用程式本身,而是程式賴以運作的基礎設施。理解它負責什麼、什麼時候需要、什麼時候可以不理它,比盲目安裝或刪除都更重要。

01Java Runtime Environment 是做什麼的?為什麼有些軟體一定要裝它?

它提供 Java 程式執行時需要的虛擬機器、核心函式庫和相關元件。很多網站、遊戲和企業內部系統是用 Java 寫的,這些程式在執行時會呼叫 Java 的函式庫,沒有這套環境就無法啟動。你可以把它想成程式的「翻譯官」,負責把 Java 寫好的指令轉換成你的電腦能理解的動作。官方說明指出,許多跨平台應用程式都需要 Java 才能正常運作。

02它跟 Java Development Kit 有什麼不同?

這套軟體是「執行環境」,只負責讓 Java 程式跑起來,不包含編譯器或除錯器等開發工具。如果你只是要使用別人寫好的 Java 程式,裝這個就夠了。但如果你要自己寫 Java 程式、編譯原始碼,就需要另外安裝 Java Development Kit(JDK),它內含完整的開發工具,也包含這套執行環境。官方文件明確說明 JRE 不包含開發工具。

03裝了它之後,哪些東西可以跑起來?

主要能跑三類東西:網頁瀏覽器裡的 Java 小程式(applet)、透過 Java Web Start 啟動的獨立應用程式,以及一般 Java 應用程式。官方說明提到,Java Plug-in 讓小程式能在瀏覽器中執行,Web Start 則能從網路部署獨立程式。此外,很多跨平台應用程式也需要它才能運作。實際能跑什麼,取決於你手上的程式是用 Java 寫的,而且版本要相容。

04它會自己更新嗎?還是要手動裝新版?

官方說明建議升級到最新版本,因為新版包含效能、穩定性和安全性的增強。但這套軟體本身不會自動更新,你需要自行到官方網站下載新版安裝。從版本紀錄來看,它持續有更新,近一年內有多次新版本釋出。如果你長期使用舊版,可能會有安全風險,建議定期檢查是否有新版本。

05瀏覽器現在還需要它嗎?

現代主流瀏覽器大多已停止支援 Java Plug-in,官方說明中提到的「在瀏覽器中執行小程式」功能,在目前的瀏覽器環境下已經很少能派上用場。不過,Java Web Start 技術仍可用來啟動獨立應用程式。如果你只是為了開瀏覽器裡的 Java 內容,可能要確認你的瀏覽器是否還支援;如果是為了跑桌面應用程式,那它仍然有用。

06我只是想玩某個老遊戲,需要裝它嗎?

如果那個老遊戲是用 Java 寫的,就需要。很多早期網頁遊戲和單機小遊戲是用 Java 開發的,沒有這套環境就無法啟動。你可以先確認遊戲的系統需求或說明文件,看是否提到需要 Java。要注意的是,老遊戲可能需要特定版本的 Java,裝了最新版不一定能跑,可能需要找舊版來搭配。

07我是寫程式的,裝這個夠用嗎?

不夠。這套軟體只提供執行環境,沒有編譯器、除錯器這些開發工具。官方文件明確指出,要進行 Java 開發,需要的是 Java Development Kit(JDK),它包含 JRE 以及編譯、除錯、打包應用程式的額外工具。如果你只是要執行別人寫好的 Java 程式,裝這個可以;但如果你要自己寫程式,請改裝 JDK。

08公司內部系統一直叫我裝 Java,這是正常的嗎?

正常。官方說明提到,Java 是企業內部應用程式和電子商務解決方案的基礎,很多公司內部系統是用 Java 開發的。如果你的公司系統要求安裝,通常是因為那些系統的後端或前端元件需要 Java 才能運作。建議依照公司 IT 部門的指示安裝,並確認版本是否符合系統需求。

09我的電腦是 Windows 11,可以裝嗎?

官方支援清單只列到 Windows 7、Windows 8 和 Windows 10,沒有提到 Windows 11。這不代表它一定不能裝,但官方沒有保證相容性。如果你用的是 Windows 11,建議先到官方網站確認是否有對應的版本,或直接安裝試試看,但要有心理準備可能遇到相容性問題。

10它只有英文介面,看不懂怎麼辦?

這套軟體的介面是英文,但安裝過程和日常使用其實不太需要看介面——它安裝完之後多半在背景執行,你不太會直接跟它的介面互動。真正需要英文的地方是安裝精靈的按鈕,通常就是「Next」「Agree」這類基本單字。如果你完全不熟悉英文,可以找網路上安裝教學文,照著步驟點即可。

11網路上有人說 Java 有安全問題,還該裝嗎?

官方說明強調這套軟體具備安全功能,包括安全管理器、沙箱環境、數位簽章和加密機制,用來防範惡意行為。但任何軟體都有潛在風險,重點是保持更新——官方建議安裝最新版本以獲得安全性增強。如果你不需要跑 Java 程式,不裝也無妨;如果需要,請從官方網站下載,並定期更新。

12我已經有 .NET Framework 了,還需要它嗎?

需要。.NET Framework 和 Java Runtime Environment 是兩套完全不同的執行環境,各自負責不同程式語言寫成的應用程式。.NET Framework 是給 .NET 程式用的,Java 程式無法靠它執行。如果你要跑的程式是用 Java 寫的,就算裝了 .NET Framework 也沒用,還是需要這套軟體。兩者可以並存,不會互相干擾。

下載與官方連結

前往官方網站 下載 Java Runtime Environment (32-bit)

jre-8u151-windows-i586.exe · 60.72 MB · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

New Features:
- security-libs/javax.crypto

New Security property to control crypto policy:
- This release introduces a new feature whereby the JCE jurisdiction policy files used by the JDK can be controlled via a new Security property. In older releases, JCE jurisdiction files had to be downloaded and installed separately to allow unlimited cryptography to be used by the JDK. The download and install steps are no longer necessary. To enable unlimited cryptography, one can use the new crypto.policy Security property. If the new Security property (crypto.policy) is set in the java.security file, or has been set dynamically by using the Security.setProperty() call before the JCE framework has been initialized, that setting will be honored. By default, the property will be undefined. If the property is undefined and the legacy JCE jurisdiction files don't exist in the legacy lib/security directory, then the default cryptographic level will remain at 'limited'. To configure the JDK to use unlimited cryptography, set the crypto.policy to a value of 'unlimited'. See the notes in the java.security file shipping with this release for more information.

Note:
- On Solaris, it's recommended that you remove the old SVR4 packages before installing the new JDK updates. If an SVR4 based upgrade (without uninstalling the old packages) is being done on a JDK release earlier than 6u131, 7u121, 8u111, then you should set the new crypto.policy Security property in the java.security file.
- Because the old JCE jurisdiction files are left in <java-home>/lib/security, they may not meet the latest security JAR signing standards, which were refreshed in 6u131, 7u121, 8u111, and later updates. An exception similar to the following might be seen if the old files are used:
- Caused by: java.lang.SecurityException: Jurisdiction policy files are not signed by trusted signers! at javax.crypto.JceSecurity.loadPolicies(JceSecurity.java:593) at javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:524)

Changes:
- security-libs/java.security
- Refactor existing providers to refer to the same constants for default values for key length

Two important changes have been made for this issue:
- 1. A new system property has been introduced that allows users to configure the default key size used by the JDK provider implementations of KeyPairGenerator and AlgorithmParameterGenerator. This property is named "jdk.security.defaultKeySize" and the value of this property is a list of comma-separated entries. Each entry consists of a case-insensitive algorithm name and the corresponding default key size (in decimal) separated by ":". In addition, white space is ignored.
- By default, this property will not have a value, and JDK providers will use their own default values. Entries containing an unrecognized algorithm name will be ignored. If the specified default key size is not a parseable decimal integer, that entry will be ignored as well.
- 2. The DSA KeyPairGenerator implementation of the SUN provider no longer implements java.security.interfaces.DSAKeyPairGenerator. Applications which cast the SUN provider's DSA KeyPairGenerator object to a java.security.interfaces.DSAKeyPairGenerator can set the system property "jdk.security.legacyDSAKeyPairGenerator". If the value of this property is "true", the SUN provider will return a DSA KeyPairGenerator object which implements the java.security.interfaces.DSAKeyPairGenerator interface. This legacy implementation will use the same default value as specified by the javadoc in the interface.
- By default, this property will not have a value, and the SUN provider will return a DSA KeyPairGenerator object which does not implement the forementioned interface and thus can determine its own provider-specific default value as stated in the java.security.KeyPairGenerator class or by the "jdk.security.defaultKeySize" system property if set.
- core-libs/java.util:collections

Collections use serialization filter to limit array sizes:
- Deserialization of certain collection instances will cause arrays to be allocated. The ObjectInputFilter.checkInput() method is now called prior to allocation of these arrays. Deserializing instances of ArrayDeque, ArrayList, IdentityHashMap, PriorityQueue, java.util.concurrent.CopyOnWriteArrayList, and the immutable collections (as returned by List.of, Set.of, and Map.of) will call checkInput() with a FilterInfo instance whose style="font-family: Courier New;">serialClass() method returns Object[].class. Deserializing instances of HashMap, HashSet, Hashtable, and Properties will call checkInput() with a FilterInfo instance whose serialClass() method returns Map.Entry[].class. In both cases, the FilterInfo.arrayLength() method will return the actual length of the array to be allocated. The exact circumstances under which the serialization filter is called, and with what information, is subject to change in future releases.
- security-libs/java.security

keytool now prints warnings when reading or generating certificates/certificate requests/CRLs using weak algorithms:
- With one exception, keytool will always print a warning if the certificate, certificate request, or CRL it is parsing, verifying, or generating is using a weak algorithm or key. When a certificate is from an existing TrustedCertificateEntry, either in the keystore directly operated on or in the cacerts keystore when the -trustcacerts option is specified for the -importcert command, keytool will not print a warning if it is signed with a weak signature algorithm. For example, suppose the file cert contains a CA certificate signed with a weak signature algorithm, keytool -printcert -file cert and keytool -importcert -file cert -alias ca -keystore ks will print out a warning, but after the last command imports it into the keystore, keytool -list -alias ca -keystore ks will not show a warning anymore.
- Precisely, an algorithm or a key is weak if it matches the value of the jdk.certpath.disabledAlgorithms security property defined in the conf/security/java.security file
- security-libs/java.security

New defaults for DSA keys in jarsigner and keytool:
- For DSA keys, the default signature algorithm for keytool and jarsigner has changed from SHA1withDSA to SHA256withDSA and the default key size for keytool has changed from 1024 bits to 2048 bits.
- Users wishing to revert to the previous behavior can use the -sigalg option of keytool and jarsigner and specify SHA1withDSA and the -keysize option of keytool and specify 1024.
- There are a few potential compatibility risks associated with this change:
- If you have a script that uses the default key size of keytool to generate a DSA keypair but then subsequently specifies a specific signature algorithm, ex:
- keytool -genkeypair -keyalg DSA -keystore keystore -alias mykey ...
- keytool -certreq -sigalg SHA1withDSA -keystore keystore -alias mykey ...
- it will fail with one of the following exceptions, because the new 2048-bit keysize default is too strong for SHA1withDSA:
- keytool error: java.security.InvalidKeyException: The security strength of SHA-1 digest algorithm is not sufficient for this key size
- keytool error: java.security.InvalidKeyException: DSA key must be at most 1024 bits
- The workaround is to remove the -sigalg option and use the stronger SHA256withDSA default or, at your own risk, use the -keysize option of keytool to specify a smaller key size (1024).
- If you use jarsigner to sign JARs with the new defaults, previous versions (than this release) of JDK 6 and 7 do not support the stronger defaults and will not be able to verify the JAR. jarsigner -verify on an earlier release of JDK 6 or 7 will output the following error:
- jar is unsigned. (signatures missing or not parsable)

If you add -J-Djava.security.debug=jar to the jarsigner command line, the cause will be output:
- jar: processEntry caught: java.security.NoSuchAlgorithmException: SHA256withDSA Signature not available
- If compatibility with earlier releases is important, you can, at your own risk, use the -sigalg option of jarsigner and specify the weaker SHA1withDSA algorithm.
- If you use a PKCS11 keystore, the SunPKCS11 provider does not support the SHA256withDSA algorithm. jarsigner and some keytool commands may fail with the following exception if PKCS11 is specified with the -storetype option, ex:
- keytool error: java.security.InvalidKeyException: No installed provider supports this key: sun.security.pkcs11.P11Key$P11PrivateKey
- A similar error may occur if you are using NSS with the SunPKCS11 provider. The workaround is to use the -sigalg option of keytool and specify SHA1withDSA.
- security-libs/java.security

Add warnings to keytool when using JKS and JCEKS:
- When keytool is operating on a JKS or JCEKS keystore, a warning may be shown that the keystore uses a proprietary format and migrating to PKCS12 is recommended. The keytool's -importkeystore command is also updated so that it can convert a keystore from one type to another if the source and destination point to the same file.
- security-libs/java.security

keytool now prints out information of a certificate's public key:
- Keytool now prints out the key algorithm and key size of a certificate's public key, in the form of "Subject Public Key Algorithm: <size>-bit RSA key", where <size> is the key size in bits (ex: 2048).

Bug fixes:
- (JBS, component, subcomponent, description)
- JDK-8179084 hotspot gc HotSpot VM fails to start when AggressiveHeap is set
- JDK-8089283 javafx web Padding property of the select tag is incorrect in WebView
- JDK-8132675 javafx web VBox.setVgrow and HBox.setHgrow corrupt following controls when window resized
- JDK-8138652 javafx web [macosx] New WebView Native Code uses private Apple APIs
- JDK-8165909 javafx web JavaScript to Java String conversion is not correct
- JDK-8170450 javafx web Crash while loading wordpress.com in HiDPI / Retina display
- JDK-8172495 javafx web Ignore __cmake_systeminformation from web module build directory
- JDK-8172836 javafx web WebView Debug build is broken
- JDK-8176729 javafx web com.sun.webkit.dom.NodeImpl#SelfDisposer is not called
- JDK-8178319 javafx web Build sqlite3 from source
- JDK-8178360 javafx web Build and integrate ICU from source
- JDK-8178440 javafx web Build libxml2 and libxslt from source
- JDK-8179673 javafx web JVM Crash in WebPage.setBackgroundColor() during webpage navigation (Non Public API)
- JDK-8180825 javafx web Javafx WebView fails to render pdf.js
- JDK-8183292 javafx web Update to 604.1 version of WebKit
- JDK-8184448 javafx web Crash while loading gif images with more frames
- JDK-8185132 javafx web window.requestAnimationFrame API is not working
- JDK-8172847 javafx window‑toolkit [macos] If you hit the escape key repeatedly to close the subwindow, the process crashes
- JDK-8029659 security‑libs java.security Keytool, print key algorithm of certificate or key entry
- JDK-8154015 security‑libs java.security Apply algorithm constraints to timestamped code
- JDK-8171319 security‑libs java.security keytool should print out warnings when reading or generating cert/cert req using weak algorithms
- JDK-8177569 security‑libs java.security keytool should not warn if signature algorithm used in cacerts is weak
- JDK-8157561 security‑libs javax.crypto Ship the unlimited policy files in JDK Updates
- JDK-8167485 tools visualvm Integrate new version of Java VisualVM based on VisualVM 1.3.9 into JDK