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

舊電腦想寫Java程式,JDK 32位元版夠用嗎

Java Development Kit (32-bit) 軟體圖示 Java Development Kit (32-bit) 112 (32-bit) 資料更新 2016-10-18 閱讀約 7 分鐘

你手上有一台比較舊的 Windows 電腦,可能是七、八年前的機器,系統還停在 Windows 7 或 Windows 8。最近想開始學寫 Java,或是有個舊專案需要重新編譯,於是上網找開發工具,結果發現 Java 的開發套件有分 32 位元和 64 位元,下載頁面全是英文,一時間不知道該選哪一個。裝錯版本怕跑不動,不裝又沒辦法繼續下一步,就這樣卡在下載頁面半小時。

一般人的直覺是「直接抓最新版、最大的那個檔案就對了」,但舊電腦的作業系統和處理器不一定支援 64 位元,硬裝上去可能連安裝程式都打不開。就算安裝成功,也可能因為記憶體不足或系統不相容而頻頻出錯。這類開發工具套件的切入點,其實是讓你在「寫程式」和「執行程式」之間有一整套工具可以用——編譯、打包、除錯、產生說明文件,而不是只給你一個能跑 Java 的環境。搞清楚自己到底需要「開發」還是只要「執行」,才不會裝了一堆用不到的東西。

01JDK 32位元版到底能拿來做什麼?

它是一整套 Java 開發工具,包含編譯器 javac,可以把寫好的 .java 原始碼編譯成 .class 位元碼;jar 工具負責把多個 class 檔打包成一個 JAR 檔案;javadoc 可以從程式碼註解自動產生 API 說明文件;jdb 是除錯器,讓你可以逐步執行程式、檢查變數值。另外它也內建一個完整的 Java 執行環境(JRE),所以開發完的程式可以直接在本機跑。

02它跟 JRE 有什麼不同?我是不是裝 JRE 就夠了?

JRE 只有 Java 虛擬機(JVM)和執行時需要的類別庫,讓你可以「執行」已經編譯好的 Java 程式,但不能自己寫程式碼再編譯。JDK 除了包含完整的 JRE,還多了編譯器、除錯器、打包工具等開發用的程式。如果你只是要跑別人寫好的 Java 應用程式或遊戲,裝 JRE 就夠;如果你要自己寫程式、編譯、打包,才需要 JDK。

03用這套軟體寫 Java 程式,需要另外裝 IDE 嗎?

不需要,但建議裝。JDK 本身是命令列工具,你可以在記事本寫好程式碼,然後打開命令提示字元,用 javac 編譯、用 java 執行,全部靠打字完成。但這樣寫程式很沒效率,官方說明中也提到,開發者通常會搭配 Eclipse、IntelliJ IDEA 或 NetBeans 這類整合開發環境使用,IDE 提供程式碼編輯器、專案管理、一鍵編譯和除錯介面,會比純命令列順手很多。

04安裝完之後怎麼確認有沒有裝好?

安裝完成後,打開命令提示字元(在 Windows 搜尋列輸入 cmd),輸入 java -version 再按 Enter。如果安裝正確,畫面上會顯示 JDK 的版本資訊;如果出現「無法辨識」或「不是內部或外部指令」的訊息,代表安裝路徑沒有正確設定,或是安裝過程有問題。官方安裝說明也特別提到用這個指令來驗證,這是第一個該做的檢查。

05它能不能編譯其他語言寫的程式?

不行。這套軟體是專門給 Java 用的,編譯器 javac 只接受 Java 原始碼,jar 打包的也是 Java 的類別檔。官方功能說明中提到的工具,包含 javac、jar、javadoc、jdb、jshell,全部都是圍繞 Java 生態系設計的。如果你要寫 C、Python 或 JavaScript,需要另外找對應的編譯器或直譯器,這套軟體幫不上忙。

06我的電腦是 32 位元的 Windows,裝這套軟體跑得動嗎?

這套軟體就是設計給 32 位元系統用的,支援 Windows 7、Windows 8 和 Windows 10,所以只要你的系統是這幾個版本之一,理論上可以安裝。不過官方資料沒有提到最低硬體需求,如果你的電腦記憶體低於 2GB,編譯大型專案時可能會比較慢。建議先安裝,用 java -version 確認能跑,再實際編譯一個小程式測試看看。

07初學者用這套軟體學 Java 會不會太難?

官方說明提到 JDK 適合從初學者到專業開發者各種程度的人使用,因為它提供完整的文件、教學和範例程式碼。但它的操作介面是命令列,沒有圖形化按鈕,對完全沒碰過程式的人來說,第一步會比較辛苦。如果你是完全新手,建議搭配一個 IDE(例如 NetBeans)一起用,IDE 會幫你處理很多指令細節,你只要專注在寫程式邏輯就好。

08只是要執行 Java 遊戲或軟體,需要裝這個嗎?

不需要。JDK 是開發工具,裡面雖然包含執行環境,但體積比較大,安裝也比較複雜。如果你只是要跑別人寫好的 Java 程式,安裝 Java Runtime Environment(JRE)就夠了,它只有虛擬機和執行所需的類別庫,輕量很多。官方資料中 JRE 的使用者評分人數有 3861 人,比 JDK 的 1110 人多,也反映多數人其實只需要執行環境。

09我的電腦是 64 位元,裝 32 位元版會有問題嗎?

官方資料沒有提到 64 位元系統安裝 32 位元版會發生什麼事,這部分需要你自己確認。一般來說,64 位元 Windows 可以執行 32 位元應用程式,但效能上可能不如原生 64 位元版本。如果你的系統是 64 位元,建議先到 Oracle 官方下載頁面看看有沒有提供 64 位元版本,有的話優先選那個,記憶體使用效率會比較好。

10公司要拿來開發商用 Java 專案,用這套軟體授權上要注意什麼?

官方說明明確寫著 JDK 可以免費下載和使用,但「商業使用」必須遵守 Oracle 的授權條款。官方文件也提到,商業使用的授權條款可能比較複雜,甚至可能需要付費。如果你的公司要用在商業產品上,建議直接到 Oracle 官方網站查閱最新的 Oracle Technology Network License Agreement,或諮詢法務人員,不要假設免費下載就等於可以任意商用。

11介面只有英文,看不懂操作選項怎麼辦?

這套軟體的介面語系確實只有英文,官方文件、安裝程式和工具輸出都是英文。不過它的核心工具都是命令列指令,常用的只有 javac、java、jar 這幾個,指令參數不多,上網搜尋都有中文教學。安裝過程也只有幾個下一步按鈕,不太會卡住。如果你連安裝程式的英文都覺得吃力,可以找網路上中文的 JDK 安裝教學,照著步驟點就可以了。

12這套軟體跟 OpenJDK 比起來哪個比較好?

官方資料中沒有提到 OpenJDK,所以無法直接比較。JDK 是 Oracle 發行的版本,OpenJDK 是開源社群維護的版本,兩者功能上很接近,但授權條款不同。如果你在意的是商業使用授權,OpenJDK 的授權通常比較寬鬆;如果你想要 Oracle 官方支援和文件,就選 JDK。建議根據你的用途(個人學習還是商業開發)和授權需求,分別到官方網站查閱條款後再決定。

下載與官方連結

前往官方網站 下載 Java Development Kit (32-bit)

jdk-8u112-windows-i586.exe · 188.99 MB · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

CHANGES:

security-libs/java.security:
- SunPKCS11 Provider no longer offering SecureRandom by default
- SecureRandom.PKCS11 from the SunPKCS11 Provider is disabled by default on Solaris because the native PKCS11 implementation has poor performance and is not recommended. If your application requires SecureRandom.PKCS11, you can re-enable it by removing "SecureRandom" from the disabledMechanisms list in conf/security/sunpkcs11-solaris.cfg
- Performance improvements have also been made in the java.security.SecureRandom class. Improvements in the JDK implementation have allowed for synchronization to be removed from the java.security.SecureRandom.nextBytes(byte[] bytes) method.

BUG FIXES:
- client-libs 2d GraphicsDevice.getConfigurations() is slow taking 3 or more seconds
- client-libs 2d Xrender: Class cast exception in 2D code running an AWT regression test
- client-libs 2d java/awt/Window/WindowsLeak/WindowsLeak.java fails
- client-libs 2d Wrong glyph is displayed for a derived font
- client-libs 2d [win10] Some unicode characters do not display any more after upgrading to Windows 10
- client-libs 2d ClassCastException: sun.font.CompositeFont cannot be cast to PhysicalFont
- client-libs 2d CCE: sun.java2d.NullSurfaceData cannot be cast to sun.java2d.opengl.OGLSurfaceData
- client-libs java.awt java.awt.SplashScreen.getSize() returns incorrect size for high dpi splash screens
- client-libs java.awt:i18n Caps Lock doesn't work as expected when using Pinyin Simplified input method
- client-libs javax.accessibility [macosx] sun.lwawt.macosx.CAccessible leaks
- client-libs javax.accessibility Uninitialised memory in WinAccessBridge.cpp:1128
- client-libs javax.accessibility Jaws reads wrong values from comboboxes when no element is selected
- client-libs javax.swing Selection in JList is drawn with wrong colors in Nimbus L&F
- client-libs javax.swing javax.swing.text.html.parser.Parser parseScript incorrectly optimized
- client-libs javax.swing JComboBox prevents wheel mouse scrolling of JScrollPane
- client-libs javax.swing Personalized Windows Font Size is not taken into account in Java8u102
- client-libs javax.swing JEditorPane.createEditorKitForContentType throws NPE after 6882559
- core-libs java.lang Annotations with lambda expressions has parameter result in wrong behavior.
- core-libs java.lang.invoke MHs.Lookup.findConstructor returns handles for array classes
- core-libs java.nio (se) Selector.select(long) uses wrong timeout after EINTR (lnx)
- core-libs javax.naming LDAP "follow" throws ClassCastException with Java 8
- core-libs javax.naming com.sun.jndi.ldap.SimpleClientId produces wrong hash code
- core-libs javax.naming Non-synchronized access to shared members of com.sun.jndi.ldap.pool.Pool
- core-libs javax.script ReferenceError in 1.8.0_72
- core-libs jdk.nashorn streamline input parameter of Nashorn scripting $EXEC function
- core-libs jdk.nashorn "ant test" fails to complete on Windows when run under cygwin shell
- core-libs jdk.nashorn Negative lookahead in RegEx breaks backreference
- core-libs jdk.nashorn Simplify Nashorn's Context class loader handling
- core-libs jdk.nashorn Nashorn shebang argument handling is broken
- core-libs jdk.nashorn Regression: two tests fail on Windows with "ant test" target
- core-libs jdk.nashorn fix Nashorn shebang argument handling on Mac/Linux
- core-libs jdk.nashorn arguments are handled differently in apply for JS functions and AbstractJSObjects
- core-libs jdk.nashorn Parsing issue with automatic semicolon insertion
- core-libs jdk.nashorn Script stack trace should display function names
- core-libs jdk.nashorn JSON.stringify does not work on ScriptObjectMirror objects
- core-libs jdk.nashorn Callback parameter of any JS builtin implementation should accept any Callable
- core-libs jdk.nashorn TypeError when a java.util.Comparator object is invoked as a function
- core-libs jdk.nashorn AccessControlException is thrown on public Java class access if "script app loader" is set to null
- core-svc Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely"
- core-svc debugger com/sun/jdi/OptionTest.java test times out again
- deploy [macosx] Java Control Panel unable to perform tasks requiring admin privileges
- deploy [macos] JVM continuously throw a NullPointerException on new MacOS 10.12
- deploy javafx FXUIToolkit.showFileChooser() fails when jre is below 7u21
- deploy javafx FXUIToolkit.showSandboxSecurityDialog fails when running jre below 7u21
- deploy javafx FXUIToolkit.showMessageDialog() fails when running jre below 7u55
- deploy webstart Add a URL scheme handler to reliably launch .jnlp files - Mac registration part
- deploy webstart Change JavawsLauncher.app to use NSTask or execv
- deploy webstart Desktop shortcut is not updated after JNLP is changed in deployment cache
- deploy webstart Allow always checkbox in security dialog when jnlp location is unknown
- deploy webstart Signed JWS application unexpectedly asks for permission to open a socket
- hotspot compiler Math.pow yields different results upon repeated calls
- hotspot compiler Need to bailout cleanly if creation of stubs fails when codecache is out of space
- hotspot compiler CastII/ConvI2L for a range check is prematurely eliminated
- hotspot compiler PPC64: unaligned Unsafe.getInt can lead to the generation of illegal instructions
- hotspot compiler Partially initialized string object created by C2's string concat optimization may escape
- hotspot gc G1: UseSHM in combination with a G1HeapRegionSize > os::large_page_size() falls back to use small pages
- hotspot gc Confusing message in "Current rem set statistics"
- hotspot gc allocating heap with UseLargePages and HugeTLBFS may trash existing memory mappings (linux)
- hotspot gc Long response times with G1 and StringDeduplication
- hotspot gc Test gc/ergonomics/TestDynamicNumberOfGCThreads.java fails
- hotspot jvmti Crash in Method::checked_resolve_jmethod_id(_jmethodID*)
- hotspot jvmti Fix for JDK-8147451 failed: Crash in Method::checked_resolve_jmethod_id(_jmethodID*)
- hotspot runtime Null ProtectionDomain in JVM can cause NPE because principals field is not initialized to an empty array
- hotspot runtime vm/mlvm/anonloader/stress/byteMutation failed with: assert(index >=0 && index < _length) failed: symbol index overflow
- hotspot runtime ConstantPool::release_C_heap_structures not run in some circumstances
- hotspot runtime Convert an assert in ClassLoaderData to a guarantee
- hotspot runtime Zero: Better byte behaviour
- hotspot runtime SIGSEGV: Metadata::mark_on_stack
- infrastructure release_eng 8u112 template file need to be updated
- install install jdk 8u71 fails to install with no error message
- install install ent msi does not have double-click support
- javafx application-lifecycle Passing objects between JavaScript (JavaFX / WebKit) and Java causes a memory leak
- javafx base SortedList wrapping a FilteredList causes AIOOBE
- javafx controls TreeTableView's selectedItems reports include null items.
- javafx controls [TreeTableView] graphic property of TreeItem is still visible after collapsing tree
- javafx controls Enhance CustomColorDialog to have flexibility to hide 'Opacity', 'Use' and 'Save' Button
- javafx graphics Scene content shows too large on Retina display, when a regular screen attached
- javafx graphics Print jobs do not finish when using a page range
- javafx graphics javafx print jobs take 60 times longer than javax.print
- javafx graphics Generated temp files (+JXF...temp) for custom fonts not deleted on exit.
- javafx graphics changes to compile under Visual Studio 14.0
- javafx graphics Crash while running imported/w3c/canvas/2d.gradient.interpolate.overlap2.html
- javafx graphics ContextMenu shown at wrong position on Windows10 with Extended Screen
- javafx graphics Revert fix for JDK-8150181 to push it with the correct commit message
- javafx graphics JavaFX Path drawing appears to leak native memory
- javafx web Javascript Timing Events stop work on system clock changes at past
- javafx web WebView Tooltip position no longer changes in 8u60
- javafx web WebView can't alert from a timer
- javafx web Debug build is not working after new WebKit upgrade
- javafx web NullPointer exception in WebView
- javafx web SQL Server Reporting Services in WebViews shows 401
- javafx web [WebView] Icon font doesn't work if single page application will be loaded from jar
- javafx web Need to document that JavaScript to Java bindings use weak references
- javafx web Update to newer version of WebKit
- javafx web DRT crash at fast/css-generated-content/initial-letter-basic.html
- javafx web Update java-wrappers for WebKit generated classes following WebKit update
- javafx web Linux: Javascript Timing Events stop work on system clock changes at past
- javafx web Linux: libjfxwebkit.so has hard-coded path
- javafx web Char value is set as integer, not as character
- javafx web Add timestamp to WebView Keyboard Event
- javafx web Can't get file size with javascript
- javafx web the JVM for our Swing application crashes, once we login into our application server
- javafx web WebView cannot render CSS background image with SVG data
- javafx web Char value is returned as integer, not as character
- javafx web Test Case Failure in CallBackTest
- javafx web WebView can't alert from a timer
- javafx web jvm crash at javafx com.sun.webkit.WebPage.twkPrePaint (GFlag + Heap verification)
- javafx web Implement overridePreference() for DRT framework
- javafx web [WebView] Unable to tile SVG image using css background property
- javafx web WebEngine doesn't handle html5 color picker
- javafx web Assertion fails with https://html-online.com/editor/
- javafx web [Win] Timer functionality is broken after JDK-8089563
- javafx web [OS X] Compilation Issue in WebPage.cpp
- javafx web Fix compilation warnings in WebCore and JavaScriptCore
- javafx web EOFException in GZIPInputStream.readUByte while browsing
- javafx web [WebView] WebView can't display social network icons on wellsfargo.com
- javafx web General sibling selector is broken for selected input boxes in WebView
- javafx web Website weibo.com cannot be loaded
- javafx web JavaFX browser can get stuck in an infinite loop when calling path.getTotalLength()
- javafx web [Windows] JavaFX crash in WebPage.twkOpen in 8u112 when closing WebView while debugging
- javafx web Loading "https://www.windyty.com" with JavaFX WebView crashes JVM.
- other-libs corba NullPointerException in IIOPInputStream.inputClassFields
- security-libs java.security New fix for memory leak in ProtectionDomain cache
- security-libs java.security SecureRandom.nextBytes() hurts performance with small size requests
- security-libs java.security Print size of DH keysize when errors are encountered
- security-libs java.security Some methods of java.security.Security require more permissions, than necessary
- security-libs javax.crypto Ucrypto config file cannot be read when -Dfile.encoding=UTF-16 is set
- security-libs javax.crypto Improve jurisdiction policy file signing exception
- security-libs javax.crypto:pkcs11 KeyStore.load() throws an IOException with a wrong cause in case of wrong password
- security-libs javax.crypto:pkcs11 LoadKeystore.java test is failing
- security-libs javax.net.ssl Hot lock on BulkCipher.isAvailable
- security-libs javax.net.ssl Make handling of 3rd party providers more stable
- security-libs javax.security The fix for 8050402 was partially committed
- security-libs org.ietf.jgss:krb5 Relax response flags checking in sun.security.krb5.KrbKdcRep.check.
- security-libs org.ietf.jgss:krb5 Semicolon is not recognized as comment starting character (Kerberos)
- tools Native2ascii doesn't close one of the streams it opens
- tools javac Incorrect class file created when passing lambda in inner class constructor
- tools launcher Showing incorrect result while passing specific argument in the Java launcher tools
- xml jaxp Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place