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

程式打不開一直說要裝 Java?JRE 是什麼、裝了能解決嗎

Java Runtime Environment (64-bit) 軟體圖示 Java Runtime Environment (64-bit) 1.6.0.18 (64-bit) 資料更新 2010-01-22 閱讀約 6 分鐘

你剛從某個網站下載了一個軟體,雙擊安裝檔卻跳出錯誤視窗,說「需要 Java Runtime Environment」;或者你打開某個老牌網路銀行、公家機關系統,畫面一片空白,只有一行字叫你安裝 Java。你只是想趕快把事情辦完,卻卡在一個聽過名字、但從來不知道它是什麼的東西上。

你直覺的反應是上網搜尋 Java 下載,裝完卻發現問題沒解決,甚至跳出更多看不懂的錯誤訊息。這是因為這類工具不是一般應用程式,它是一個「執行環境」——負責讓用 Java 寫的程式在你的電腦上跑起來。裝錯版本、裝到開發工具、或沒注意系統位元數,都會讓你白忙一場。這篇文章要講清楚的,就是這個執行環境到底解決什麼問題、什麼時候你才真的需要它。

01Java Runtime Environment 到底是做什麼用的?裝了它能幹嘛?

它是一套讓 Java 程式能在你的 Windows 電腦上執行的必備元件,包含 Java 虛擬機(JVM)和一堆程式庫。白話來說,很多軟體、網頁元件、遊戲是用 Java 寫的,你的電腦沒有這套環境,那些程式就跑不起來。裝了之後,這些應用程式才能正常開啟,例如線上遊戲、3D 圖片檢視、某些企業內部系統。

02我怎麼知道電腦裡有沒有裝這套軟體?

打開命令提示字元(cmd),輸入 `java -version` 後按 Enter。如果有安裝,畫面上會顯示 Java 的版本資訊;如果顯示「不是內部或外部命令」之類的訊息,就代表沒裝。另外,也可以到 Windows 的「控制台 → 程式和功能」裡找有沒有 Java 相關的項目。

03這套軟體和 Java Development Kit(JDK)有什麼不同?

JRE 是拿來「執行」Java 程式的,JDK 是拿來「開發」Java 程式的。JDK 裡面包含了 JRE,但另外還有編譯器、除錯器等開發工具。如果你只是要跑別人寫好的 Java 軟體,裝 JRE 就夠了;如果你要自己寫 Java 程式,才需要裝 JDK。裝錯的話,只是佔用硬碟空間,不會造成系統問題。

04裝了這套軟體之後,還需要做什麼設定嗎?

一般情況下不需要。安裝完成後,Java 程式就能直接執行。不過,有些瀏覽器基於安全考量,預設會擋掉 Java 外掛,如果你需要透過瀏覽器使用 Java 應用程式(例如某些舊的網路銀行系統),可能要在瀏覽器的外掛管理或 Java 控制面板裡調整安全性設定,允許執行。

05這套軟體可以同時裝好幾個版本嗎?

可以。官方說明指出,你可以在同一台電腦上安裝多個版本的 JRE。不過,官方也建議只保留最新版本,因為舊版本可能含有未修補的安全性漏洞。如果你不確定某個舊版是不是還有程式在用,可以先保留,等確認沒問題後再移除。

06我只是想玩個遊戲或開個文書軟體,為什麼還要裝這個?

因為那個遊戲或軟體是用 Java 寫的。Java 的設計理念是「一次編寫,到處執行」,所以很多跨平台的應用程式會用它開發。開發者把程式包裝好之後,使用者的電腦必須有 JRE 才能把程式跑起來。這不是你的問題,而是軟體本身的技術需求。

07我的電腦是 64 位元的 Windows,該裝哪一個版本?

這套軟體名稱就標明是 64-bit,支援 Windows 7 到 Windows 11 的 64 位元系統。安裝前可以先確認你的 Windows 是 64 位元還是 32 位元(在「設定 → 系統 → 關於」裡可以查到)。如果你的系統是 32 位元,這套 64 位元版本就無法安裝,需要另外找 32 位元的版本。

08這套軟體的介面是英文的,我看不懂怎麼辦?

這套軟體的介面語系是英文,安裝過程和 Java 控制面板都是英文介面。不過,安裝完成後,你平常使用 Java 程式時並不會看到它的介面——它是在背景運作的。只有當你需要調整 Java 的安全性設定或更新時,才會需要面對英文介面。如果完全無法理解,可以找線上翻譯或請熟人協助。

09我裝了這套軟體之後,電腦變慢或出現安全警告,是正常的嗎?

Java 本身具備安全模型,包含沙箱(sandbox)、程式碼簽章和權限控管,目的是讓 Java 程式在受控的環境中執行。但因為 Java 曾多次被發現安全漏洞,所以有些防毒軟體或瀏覽器會對 Java 外掛發出警告。建議你只從官方網站下載,並保持軟體更新,以降低風險。

10我是一個程式設計師,裝這套軟體夠用嗎?

不夠。JRE 只能執行 Java 程式,不能編寫和編譯程式碼。如果你要開發 Java 應用程式,需要的是 JDK(Java Development Kit),它包含了編譯器(javac)和除錯工具。官方說明也明確指出,JDK 是用來開發的,JRE 是用來執行的。如果你只是要跑別人寫好的工具,JRE 就夠了。

11這套軟體一直叫我更新,不更新會怎樣?

官方建議定期更新,因為更新通常包含錯誤修正、安全性修補和效能改善。如果你不更新,舊版本可能無法執行某些新開發的 Java 程式,也可能暴露在已知的安全風險中。不過,更新與否最終取決於你使用的程式是否需要新版本——如果現有程式都跑得好好的,短期內不更新不會立刻出問題。

12有沒有其他軟體可以取代這套軟體?

如果你要執行 Java 程式,JRE 是必要的,沒有其他軟體可以完全取代它。資料中列出的相近軟體,例如 .NET Framework,是微軟開發的執行環境,用途不同,無法互相替代。如果你是要開發 Java 程式,可以考慮 NetBeans IDE 或 JDK,但這些是開發工具,不是執行環境。

下載與官方連結

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

jre-6u18-windows-x64.exe · 15.61 MB · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

# OlsonData 2009s

* 6u18 contains Olson time zone data version 2009s.

# Additional Supported System Configurations
For 6u18, support has been added for the following system configurations:
* Ubuntu 8.04 LTS Desktop Edition for both JFB and Java SE (x86) in 32-bit
* SLES 11
* Windows 7 support is now available
* Red Hat Enterprise Linux 5.3

# VisualVM 1.2
VisualVM 1.2 is included in 1.6.0_18. VisualVM 1.2 introduces the following features and enhancements:
* Sampling CPU and Memory profiler plugin (VisualVM-Sampler available on Plugins Center)
* Support for multiple jstatd connections on a single local/remote host
* New charts with dynamic tooltips, public Charts API for plugins
* Monitor and Threads tab are saved into Application Snapshot
* Application Snapshots can be opened using the Load action or --openfile parameter
* Properties UI for Applications, Hosts and Snapshots, public Properties API for plugins
* Customizable proxy settings in Options dialog
* UI for customizing SSL certificates in Options dialog (VisualVM-Security available on Plugins Center)
* Enhanced JMX API to enable customizing JMX environment/connections by plugins
* Display name defined by the monitored application: visualvm.display.name property
* Improved performance for remote X sessions
* Automatic detection of broken jvmstat on Windows (username capitalization vs. hsperfdata file)
* Various UI improvements: main menu, toolbar and context menu; system (theme) colors; About dialog, profiler snapshots, HeapWalker

# Java DB
Java DB 10.5.3.0 is included in 1.6.0_18. Java DB 10.5.3.0 introduces the following improvements:
* SQL Roles
* Generated Columns
* LOB Improvements
* Replication of encrypted databases
* OFFSET/FETCH FIRST syntax
* In-memory back end
* Better updating of optimizer statistics
* Service-tag aware installers

# Performance Improvements
6u18 introduces improvements in the following areas:
* Faster jar File Creation
The fix of a long standing bug related to jar file creation has greatly improved creation time. For example, for a given jar file, it is possible that you might see a creation time improvement in the range of 20 percent. (Refer to 6496274.)

* Java Hotspot VM 16.0
6u18 includes version 16.0 of the Java HotSpot Virtual Machine. Contributing to increased performance in this release are several enhancements in Java HotSpot VM 16.0. These include:
- Improved NUMA-aware allocation
- Extensions to compressed object pointers
- Garbage collection improvements
> Updated Client JVM heap configuration
In the Client JVM, the default Java heap configuration has been modified to improve the performance of today's rich client applications. Initial and maximum heap sizes are larger and settings related to generational garbage collection are better tuned.
^ The default maximum heap size is half of the physical memory up to a physical memory size of 192 megabytes and otherwise one fourth of the physical memory up to a physical memory size of 1 gigabyte.
For example, if your machine has 128 megabytes of physical memory, then the maximum heap size is 64 megabytes, and greater than or equal to 1 gigabyte of physical memory results in a maximum heap size of 256 megabytes.
^ The maximum heap size is not actually used by the JVM unless your program creates enough objects to require it. A much smaller amount, termed the initial heap size, is allocated during JVM initialization. This amount is at least 8 megabytes and otherwise 1/64 of physical memory up to a physical memory size of 1 gigabyte.
^ The maximum amount of space allocated to the young generation is one third of the total heap size.
^ The updated heap configuration ergonomics apply to all collectors except Concurrent Mark-Sweep (CMS). CMS heap configuration ergonomics remain the same.
^ Server JVM heap configuration ergonomics are now the same as the Client, except that the default maximum heap size for 32-bit JVMs is 1 gigabyte, corresponding to a physical memory size of 4 gigabytes, and for 64-bit JVMs is 32 gigabytes, corresponding to a physical memory size of 128 gigabytes.
> Work stealing termination
> Work queue overflow processing
> Bit set processing on 64-bit Linux
- Class loading optimizations for faster startup
- Code generation improvements
> New intrinsics using SSE 4.2
> New intrinsics for Integer/Long bit operations - leading/trailing zeros, bit count
> Unsigned byte and integer loads
> Integer load shortening
> Elision of needless conversions between integer primitive types
> Optimization of common string concatenation patterns
- Garbage First (G1) garbage collector
> Improved reliability and performance
> Available as "early access" software.
- Serviceability enhancements
> New options to request a heap dump or class histogram before or after a full GC
> New tool to decode LogCompilation output
- Extensive reliability improvements

* Application Startup Improvements
- Better startup of applications and applets on systems where D3D is used. Savings are up to 100-200ms depending on application and the system.
- Revised support for pre-verification of FX runtime. Improves warm start of typical FX applications by up to 15 percent.
- Concurrent download of jars for webstart applications and applets.
- Number of other startup improvements for UI applications and applets.

* Runtime Performance Improvements for UI Applications
- Improved performance of applications using translucent windows.
- Better performance and smaller memory consumption by text rasterizer.
- Faster processing of PNG images.

* Ability to Read Larger .zip Files
- As of this update release, it is possible to read .zip files of sizes up to 4 gigabytes.

# Deployment Updates
* Java Web Start
Java Web Start now implements JSR-056 version 6.0.18.
New Java Network Launch Protocol (JNLP) API
- The javax.jnlp.DownloadService2 interface provides services to query the cache. See Using the DownloadService2 Service to learn more.
- The javax.jnlp.DownloadServiceListener interface provides methods to specify a custom progress indicator that indicates the progress of an application's download. See Using the DownloadServiceListener Service to learn more. See JNLP File Syntax for information about the syntax of JNLP files.
- The javax.jnlp.IntegrationService interface provides methods for programmatic management of shortcuts. See Using the IntegrationService Service to learn more.

* Deploying Java Web Start Applications Without Specifying the codebase Attribute The Deployment Toolkit script contains the following new functions that enable the deployment of Java Web Start applications without specifying the codebase attribute in the application's JNLP file:
- createWebStartLaunchButtonEx(jnlp, minimumVersion)
- launchWebStartApplication(jnlp)

* New JNLP Extension Security Dialog
A new security dialog has been introduced in 6u18 for installing signed Java extensions on a user's system. Java extensions are components described in JNLP files that are typically intended to be used by a large number of applications and applets.
The new security dialog is triggered by an application that references the Java extension in its JNLP file (by including it in the resources element). The security dialog will ask the user if they would like to install the extension. Once the extension is installed, it can be referenced by other applications without the need for asking the user's permission again (as long as it is the same extension from the same codebase).
The JNLP file of the Java extension must adhere to the following requirements:
- The JNLP file MUST contain a component-desc element that describes the Java extension.
- The JAR files that are specified in the resources element MUST be signed with the same certificate.
- The signer's certificate MUST contain an Authority Information Access or CRL Distribution Points extension so that the revocation status can be checked (via OCSP or CRLs).

# JSR-173 StAX 1.2 API Upgrade
* 6u18 includes an upgrade to minor revision 1.2 of JSR-173 Streaming API for XML (StAX) which was a result of Maintenance Reviews 2 and 3. You can find more details about these Maintenance Reviews in the JSR 173 Change Log.
* The StAX 1.2 upgrade maintains binary and source compatibility. Existing binaries compiled on StAX 1.0 will continue to run on StAX 1.2. Programs written to StAX 1.0 will continue to compile to StAX 1.2.
* There will be a minor behavioral difference if deprecated methods are used. In this case, there will be deprecation warnings at compilation. Other than these warning messages, the StAX 1.2 upgrade maintains behavioral compatibility.

# Various bug fixes