Skip to Content
Quizzes
  • PRO
    Courses Hot Guides Tech Help Pro Expert Videos About wikiHow Pro Upgrade
  • QUIZZES
    All Quizzes Hot Love Quizzes Personality Quizzes Trivia Quizzes Taylor Swift Quizzes
  • EDIT
    Edit this Article
  • EXPLORE
    Tech Help ProAbout UsRandom ArticleQuizzes
    Request a New ArticleCommunity DashboardTrendingForums
    Arts and EntertainmentArtworkBooksMovies
    Computers and ElectronicsComputersPhone SkillsTechnology Hacks
    HealthMen's HealthMental HealthWomen's Health
    RelationshipsDatingLoveRelationship Issues
    Hobbies and CraftsCraftsDrawingGames
    Education & CommunicationCommunication SkillsPersonal DevelopmentStudying
    Personal Care and StyleFashionHair CarePersonal Hygiene
    Quizzes Love Quizzes Personality Quizzes Fun Games
    Arts and EntertainmentFinance and BusinessHome and GardenRelationship Quizzes
    Cars & Other VehiclesFood and EntertainingPersonal Care and StyleSports and Fitness
    Computers and ElectronicsHealthPets and AnimalsTravel
    Education & CommunicationHobbies and CraftsPhilosophy and ReligionWork World
    Family LifeHolidays and TraditionsRelationshipsYouth
  • LOG IN

    Log in

    Facebook
    Google
    wikiHow Account
    No account yet? Create an account
  • RANDOM
  • Home
  • Random
  • Browse Articles
  • TrendingNew
  • Quizzes & Games
  • All QuizzesHot
  • Love Quizzes
  • Personality Quizzes
  • Fun Games
  • Dating Simulator
  • Learn Something New
  • Forums
  • Courses
  • Happiness Hub
  • Explore More
  • Support wikiHow
  • About wikiHow
  • Log in / Sign up
wikiHow is where trusted research and expert knowledge come together. Learn why people trust wikiHow
Go Back
",b.appendChild(a),document.getElementById("ow_return").addEventListener("click",function(){WH.event("article_offerwall_return_kp");window.location.href=window.location.origin+"/"+whadconfig.offerwallbacklocation}),document.querySelector(".fc-list-item-button").addEventListener("click",function(){WH.event("article_offerwall_watch_ad_kp")});return}c=$jscomp.makeIterator(c.removedNodes);for(f=c.next();!f.done;f=c.next())if(e=f.value,1===e.nodeType&&e.classList.contains("fc-message-root")){e.querySelector(".fc-monetization-dialog")&&(WH.event("article_offerwall_complete_ad_kp"),Object.keys(localStorage).forEach(function(a){a.startsWith("gated-")&&localStorage.removeItem(a)}));b.disconnect();return}}})).observe(document.body,{childList:!0,subtree:!1}),Ha="true"===localStorage.getItem("gated-"+WH.pageID));var ec=-1!=window.location.href.indexOf("allowofferwall=1")?!0:void 0;ec&&(Ha=!0);window.googlefc=window.googlefc||{}; window.googlefc.controlledMessagingFunction=function(a){console.log("Incoming FC message:",a);Ha?(console.log("isGated .. message proceed called, allowing any messages or offerwalls to show"),a.proceed(!0)):(console.log("message proceed not allowed for offerwall"),a.proceed(!1,[window.googlefc.MessageTypeEnum.OFFERWALL]))};var E=!1,F=!1;g()&&(E=!0);var D=!1;window.fcdomain&&E&&(D=!0);WH.shared.isSmallSize&&window.dfpSmall&&(ub=5*ea);var fc="0px 0px "+ub+"px 0px",gc="0px 0px "+dc+"px 0px",xa="-104% 0px 950px 0px",$a="-104% 0px 950px 0px",Ca=1700,ca=!1;window.CSS&&window.CSS.supports&&window.CSS.supports("position","sticky")&&(ca=!0);var ta=!1;-1!=window.location.href.indexOf("empty=1")&&(ta=!0);window.googletag=window.googletag||{};window.googletag.cmd=window.googletag.cmd||[];var Ka={buckets:[{precision:2,max:3,increment:.01},{precision:2,max:8,increment:.05},{precision:2,max:20,increment:.5},{precision:2,max:45,increment:1}]},V=[],vb=document.getElementById("adDataConfig"),C=null;null !=vb&&(C=JSON.parse(vb.innerHTML))&&(C.scrolltoRootLoadingMargin&&(h("configData.scrolltoRootLoadingMargin",C.scrolltoRootLoadingMargin),xa=C.scrolltoRootLoadingMargin),C.scrolltoRootLoadingMarginFirstStep&&(h("configData.scrolltoRootLoadingMargin",C.scrolltoRootLoadingMargin),$a=C.scrolltoRootLoadingMarginFirstStep),C.scrolltoLoadingCheck&&(h("configData.scrolltoLoadingCheck",C.scrolltoLoadingCheck),Ca=C.scrolltoLoadingCheck));window.pbjs=window.pbjs||{};window.pbjs.que=window.pbjs.que||[];window.pbjsrequested=!1;window.pbjsloaded=!1;WH.shared.isTest("webvitalsINP")&&window.pbjs.que.push(function(){window.pbjs.onEvent("addAdUnits",function(){h("prebid ad units were added",pbjs.adUnits)});window.pbjs.onEvent("beforeRequestBids",t);window.pbjs.onEvent("bidWon",function(a){h(a.bidderCode+" attempt won the ad server auction for ad unit "+a.adUnitCode+" at "+a.cpm+" CPM")})});if(WH.isDev&&-1!=window.location.href.indexOf("fundingchoicesload=1")){var ka=document.createElement("script");ka. async=!0;ka.type="text/javascript";ka.src="/?url=https%3A%2F%2Ffundingchoicesmessages.google.com%2Fi%2F10095428%3Fers%3D3";var wb=document.getElementsByTagName("script")[0];wb.parentNode.insertBefore(ka,wb)}window.googletag&&(window.googletag.cmd.push(function(){window.googletag.pubads().addEventListener("slotOnload",function(a){a=a.slot.getSlotId().getAdUnitPath();h("GPT lazyload slotOnload:",a)});window.googletag.pubads().addEventListener("slotRequested",function(a){a=a.slot;var b=a.getSlotId().getDomId(),d=a.getSlotId().getAdUnitPath();h("GPT slotRequested:",b,d,a.getTargetingMap());h("GPT lazyload slotRequested:",d)})}),window.googletag.cmd.push(function(){window.googletag.pubads().addEventListener("slotResponseReceived",function(a){a=a.slot;var b=a.getSlotId().getDomId(),d=a.getSlotId().getAdUnitPath(),e=a.getResponseInformation(),f=null,g=null;e?(f=e.campaignId,g=e.lineItemId):h("GPT slotResponseReceived: no response information received for request",b);2622783038==f?h( "GPT slotResponseReceived: aps won",b,d,"campaign:",f,"lineItem:",g,"queryId:",a.getEscapedQemQueryId()):2709340992==f?h("GPT slotResponseReceived: prebid won",b,d,"campaign:",f,"lineItem:",g,"queryId:",a.getEscapedQemQueryId()):h("GPT slotResponseReceived",b,d,"response info",e,"queryId:",a.getEscapedQemQueryId());ma()&&n&&d==n.adunitpath&&(h("GPT slotResponseReceived done updating scrollto adTargetId from/to",n.adTargetId,n.element.id),n.adTargetId=n.element.id)})}));"IntersectionObserver"in window&&(I=new IntersectionObserver(function(a,b){a.forEach(function(a){a.isIntersecting&&(jb(a.target),I.unobserve(a.target))})},{rootMargin:fc}),Aa=new IntersectionObserver(function(a,b){a.forEach(function(a){a.isIntersecting&&(jb(a.target),Aa.unobserve(a.target))})},{rootMargin:gc}));WH.isMobile&&(va=314);WH.shared.isLargeSize&&WH.shared.isTest("aditude")&&"quiz"==window.whadconfig.gamconfig.pagetype&&window.googletag.cmd.push(function(){window.googletag.pubads().addEventListener( "slotRenderEnded",function(a){(a=a.slot)&&"rightrail0_ad_1"==a.getSlotId().getDomId()&&m&&(a=m[0],a.lastRefreshTime=performance.now(),h("setting last refresh time on rr ad to",Math.floor(a.lastRefreshTime/1E3),"seconds"))})});WH.shared.isLargeSize&&WH.shared.isTest("aditude")&&"name_generator"==window.whadconfig.gamconfig.pagetype&&window.googletag.cmd.push(function(){window.googletag.pubads().addEventListener("slotRenderEnded",function(a){if(a=a.slot){a=a.getSlotId().getDomId();for(var b=0;b100*Math.random()&&WH.eventView("bucket_1k",{bucket:WH.bucket});var a=(window.innerWidth||document.documentElement.clientWidth)>=WH.largeScreenMinWidth;I||(da=WH.shared.throttle(wa,100),window.addEventListener("scroll",da));1!=a||ca||(tb=WH.shared.throttle(Ob,10),window.addEventListener("scroll",tb));a&&Yb(); document.addEventListener("DOMContentLoaded",function(){wa()},!1);WH.shared&&WH.shared.addResizeFunction(wa);Ub();Xa(!1);Tb();WH.shared.isTest("aditudeOutstreamVideo")&&document.addEventListener("DOMContentLoaded",Wb,!1);g()&&document.addEventListener("DOMContentLoaded",Xb,!1);WH.shared.isTest("aditude")&&window.whadconfig.androidads&&WH.shared.isSmallSize&&document.addEventListener("DOMContentLoaded",function(){$b()},!1);WH.shared.isTest("aditude")&&WH.shared.isTest("quizFooterAd")&&document.addEventListener("DOMContentLoaded",function(){ac()},!1);WH.shared.isTest("aditude")&&WH.shared.isTest("adDensity")&&WH.shared.isSmallSize&&window.addEventListener("load",function(){bc()},!1);WH.shared.isTest("aditude")&&WH.shared.isTest("exitIntentAd")&&cc();"undefined"!=typeof window.whadconfig&&"name_generator"==window.whadconfig.gamconfig.pagetype&&Ga();"undefined"!=typeof window.whadconfig&&"Special:QuizHubPage"==window.WH.pageName&&"/Quizzes"==window.location.pathname&&document. addEventListener("DOMContentLoaded",Vb,!1);document.addEventListener("DOMContentLoaded",function(){document.querySelector(".ng_widget_section")&&Ga()},!1);WH.isDev&&!ma()&&(window.googletag=window.googletag||{cmd:[]},console.log("set dummyad targeting"),window.googletag.cmd.push(function(){googletag.pubads().setTargeting("dummyad","1")}))},addBodyAd:ya,addExtraRRElemement:function(a,b){"regularrelated"==b&&WH.shared.isTest("rightrailthumb_hp_design")||(document.getElementById(a),WH.eventView("rightrail_extra_sections_click",{section:b},"#"+a+" a","click"))},loadTOCAd:function(a){if("string"===typeof a&&(a=a.slice(1),a=document.getElementById(a),J)){var b=$(a).next(".section").find(".steps_list_2 > li:first");$(a).hasClass("mw-headline")&&(b=$(a).parents(".section:first").find(".steps_list_2 > li:first"));b.length&&(b.append($(J.adElement)),J.load(),J.adElement.style.display="block",J=null)}},slotRendered:function(a,b,d){a=d.slot;var c=a.getSlotId().getDomId(),e=a.getSlotId(). getAdUnitPath(),g=d.isEmpty;ta&&(g=!0);a.getResponseInformation();La()&&1==g&&(h("GPT slotRenderedEnded: ad is empty:",c,e,a.getTargetingMap()),a&&(e=a.getTargetingMap().hb_pb,"undefined"!=typeof e&&"undefined"!=typeof e[0]&&(e=e[0],a=a.getTargetingMap().hb_adid,a=a[0],h("GPT slotRenderedEnded: ad is empty hb_pb:",e,"hb_adid",a))));if(1==g){if("footerad"==c&&(a=document.getElementById("footerad_wrap"),ma()||a.remove()),"mp_rr_ad"==c||"outstreamVid"==c||"outstreamVidSmall"==c||"gamOutstreamVidSmall_ad_1"==c)a=document.getElementById(c),e=window.location.href,a&&e&&0>e.indexOf("showemptyads=1")&&(WH.shared.isSmallSize&&(e=a.parentElement.nextSibling.nextSibling.nextSibling)&&"al_method"==e.className&&(e.parentElement.removeChild(e),h("removing ad label for empty video ad")),h("GPT slotRenderedEnded: removing empty video ad:",a),a.parentElement.parentElement.removeChild(a.parentElement))}else if("footerad"==c&&document.getElementById("footerad_close")&&document.getElementById( "footerad_close").classList.add("loaded"),0===c.indexOf("ad_density_")){var k=function(a){a=document.getElementById(a);if(!a)return!1;var b=a.getBoundingClientRect();if(10>b.width||10>b.height)return!1;b=a.querySelector("iframe");if(!b)return!1;b=b.getBoundingClientRect();if(10>b.width||10>b.height)return!1;a=a.parentNode;a.nextElementSibling&&a.nextElementSibling.classList.contains("al_method")||(b=document.createElement("div"),b.className="al_method",b.textContent="Advertisement",a.parentNode.insertBefore(b,a.nextSibling));return!0};setTimeout(function(){k(c)||setTimeout(function(){return k(c)},150)},50)}if(d=la(d))d.logData&&Eb(d.adunitpath,g),d.pbTargetingAdded=!1,d.apsDisplayBidsCalled=!1,d.slotRendered=!0,d.isDFPLoading=!1,"scrollto"==d.type&&(d.adTargetId=d.element.id),"rightrail"==d.type&&(d.height=d.element.offsetHeight,d.element.classList.remove("blockthrough"),d.extraChild&&b&&300>parseInt(b[1])?d.extraChild.style.visibility="visible":d.extraChild&&(d.extraChild.style. visibility="hidden"),(b=kb.shift())&&b.load())},impressionViewable:function(a){h("impressionViewable:",a.getSlotId().getDomId(),a.getSlotId().getAdUnitPath());for(var b,d=0;d
',$(a).appendTo("#quiz_small_affiliate_placeholder"),$(a).insertBefore(".youmightalsolike"),a='
',$("#quiz_top_wrap").append(a),$('
').insertBefore("#newsletter_block_main"),H=new IntersectionObserver(function(a,b){a.forEach(function(a){Ya(a.target,a.isIntersecting)})},{rootMargin:"0px 0px 0px 0px"}),Xa(!0),b=document.getElementsByClassName("scrolltomarker"),a=0;am.length||(a=m[0],a.actionrefresh&&(a.adElement.style.height="600px",a.refresh()))},100)},getQuizPositionTargetingValue:P}}();WH.ads.init();
  • Categories
  • Computers and Electronics
  • Software
  • Install & Uninstall Software

How to Install the Java Software Development Kit

PDF download Download Article
Written by Travis Boylls

Last Updated: February 19, 2024 References

PDF download Download Article
  • Downloading the Java Software Development Kit
  • |
  • Installing on Windows
  • |
  • Installing on macOS
  • |
  • Installing from an Archive on Linux or Solaris
  • |
  • Installing from a Package on Linux
  • |
  • Q&A
X

This article was co-authored by wikiHow staff writer, Travis Boylls. Travis has been a tech writer at wikiHow for more than 10 years. He has also worked in technical support for Dish Network and AT&T Wireless. He studied graphic design and web design at Pikes Peak Community College. He specializes in Windows, macOS, Linux, Android, iOS, and video game consoles. Travis has had a fascination with computers and technology that goes all the way back to childhood. He is proficient in all manner of software and computer operating systems.

There are 9 references cited in this article, which can be found at the bottom of the page.

This article has been viewed 566,411 times.

Learn more...

Before you can create and modify Java programs, you’ll need the Java Software Development Kit. You can download the kit (also known as Java SDK or JDK) for free from Oracle as a single installer file, which makes installation quick and easy. Learn the best way to download and install the Java Software Development Kit on your Windows, macOS, or Linux system.

Steps

Part 1
Part 1 of 5:

Downloading the Java Software Development Kit

PDF download Download Article
  1. Step 1 Navigate to https://www.oracle.com/technetwork/java/javase/downloads/index.html....
    1
    Navigate to https://www.oracle.com/technetwork/java/javase/downloads/index.html. You can download a simple Java Software Development Kit (JDK) installer for Windows, macOS, or Linux directly from Oracle.
  2. Step 2 Click the Download button beneath “JDK.”
    2
    Click the Download button beneath “JDK.” This will open a new page containing several download options.[1]
    Advertisement
  3. Step 3 Scroll to the latest version of Java SE Development Kit.
    3
    Scroll to the latest version of Java SE Development Kit. You should always use the latest stable version of the toolkit. There may be more than one version listed, so look closely at the release number.[2]
    • For example, if you are presented with JDK 8u101 and 8u102, choose 8u102.
  4. Step 4 Click the radio button next to "Accept License Agreement.”
    4
    Click the radio button next to "Accept License Agreement.” Before you can click the download link, you must accept the license agreement. The option is just beneath the JDK version number.
  5. Step 5 Sign in or register a new account.
    5
    Sign in or register a new account. Before you can download the file, you must sign in an Oracle account. If you already have a account with Oracle, sign in with the email address and username associated with your account. If you do not have account, click Create account and fill out the form to create an account.
  6. Step 6 Click the download link for your operating system.
    6
    Click the download link for your operating system. You can download Java SE JDK for Windows, macOS, or Linux. Once you click the link, follow the prompts to select a save location on your computer and start the download.
  7. Advertisement
Part 2
Part 2 of 5:

Installing on Windows

PDF download Download Article
  1. Step 1 Double-click the JDK installer file.
    1
    Double-click the JDK installer file. Once you’ve downloaded the Java Software Development Kit installer, navigate to the download location you chose earlier to launch the installer. By default, downloaded files can be found in your Downloads folder. You can also open the file from within your web browser.
    • The file name for the Java Software Development Kit installer is "dk-13.0.2_windows-x64_bin.exe" or "jdk-13.0.2_windows-x64_bin.zip". If you download the ZIP file, you will need to extract the contents of the zip file.
  2. Step 2 Allow the app to make changes to your computer.
    2
    Allow the app to make changes to your computer. Depending on your version of Windows, you may be prompted to give permission for JDK to install. Click “Yes” or “OK” when prompted, and the installer’s Welcome screen will appear.[3]
  3. Step 3 Click Next to continue.
    3
    Click Next to continue. Now you’ll move through a series of screens that will guide you through the JDK installation.
  4. Step 4 Click Next to accept the default installation settings.
    4
    Click Next to accept the default installation settings. This will begin the installation, which may take a few minutes depending on your computer. The green progress bar will show the progress of the installation.[4]
  5. Step 5 Click Close when the installation is complete.
    5
    Click Close when the installation is complete. This button will not appear until the installer has finished.
  6. Step 6 Open the Windows Advanced System Settings in the Control Panel.
    6
    Open the Windows Advanced System Settings in the Control Panel. Use the following steps to navigate to the Advanced System Settings in the Control Panel:
    • Click the Windows Start menu and type Control Panel.
    • Click the Control Panel.
    • Click System and Security.
    • Click System.
    • Click Advanced System Settings in the panel to the left.
  7. Step 7 Navigate to the Advanced tab.
    7
    Navigate to the Advanced tab. You’ll see a few different areas where you can adjust various system settings.
  8. Step 8 Click the Environment Variables button.
    8
    Click the Environment Variables button. This new dialog box displays two separate areas—one for User Variables (settings specific to your user account) and another for system-wide settings (System Variables).[5]
  9. Step 9 Double-click the Path variable under “System Variables.”
    9
    Double-click the Path variable under “System Variables.” Now you’ll add a new variable. Follow these instructions exactly, as there is no “undo” option.[6]
  10. Step 10 Edit the environment variables (Windows 10 only).
    10
    Edit the environment variables (Windows 10 only). This step only applies to Windows 10. Use the following steps to edit the environment variables:
    • Click New
    • Type c:\Program Files\Java\jdk1.8.0_xx\bin (but replace the “8.0_xx” part with the version number you installed).
    • Click the Move Up button until the path you typed appears at the top of the list.
    • Click OK.
  11. Step 11 Set the variable (Older versions of Windows only).
    11
    Set the variable (Older versions of Windows only). Skip this step if you’re using Windows 10. You should see the “Edit System Variable” window. Make the following changes to the “Variable value” field only (don’t delete what’s there though):
    • Type C:\Program Files\Java\jdk1.8.0_xx\bin (but replace the “8.0_xx” with the correct version number) in FRONT of the other directories.
    • Add a semicolon (;) to the very end of what you just typed, just like this: C:\Program Files\Java\jdk1.8.0_xx\bin;
    • There should be no space before or after the semicolon, so the entire line should look something like this: C:\Program Files\Java\jdk1.8.0_2\bin;C:\Program Files\Intel\xxx
    • Click OK.
    • Click OK until you’ve closed all open windows.
  12. Step 12 Open the Command Prompt icon.
    12
    Open the Command Prompt
    Windows cmd
    .
    Use the following steps to open the Command Prompt:[7]
    • Right-click the windows start menu and type cmd.
    • Click the Command Prompt icon.
  13. Step 13 Type path and press ↵ Enter.
    13
    Type path and press ↵ Enter. You should see the full path to the JDK that you entered earlier.
  14. Step 14 Type java –version and press ↵ Enter.
    14
    Type java –version and press ↵ Enter. The version of JDK you installed will now appear on the screen.
    • If either part of this command-prompt test does not produce results, you may need to load the new environment variables by rebooting the computer.
  15. Advertisement
Part 3
Part 3 of 5:

Installing on macOS

PDF download Download Article
  1. Step 1 Double-click the installer file you downloaded.
    1
    Double-click the installer file you downloaded. After downloading the Java Software Development Kit installer, double-click the downloaded file in the Downloads window of your web browser or in Finder.[8]
  2. Step 2 Open the downloaded file.
    2
    Open the downloaded file. You can find downloaded files inside the "Downloads" folder or inside your web browser. The file name should be "jdk-13.0.2_osx-x64_bin.dmg" or something similar.
  3. Step 3 Double-click the package icon to start the installer.
    3
    Double-click the package icon to start the installer. This icon looks like an open box. The JDK installer will launch.
  4. Step 4 Click Continue on the Introduction window.
    4
    Click Continue on the Introduction window. You’ll now see the Installation Type window.
    • If you see a window that says “Destination Select” after clicking continue, click “Install for all users of this computer.” Not all users will see this window. Then click Continue. [9]
  5. Step 5 Click Install.”
    5
    Click Install.” You will see a window that says “Installer is trying to install new software. Type your password to allow this.”
  6. Step 6 Sign in as an administrator.
    6
    Sign in as an administrator. Type your administrator username and password into the provided blanks.
  7. Step 7 Click “Install Software.”
    7
    Click “Install Software.” This may take a few minutes, depending on the speed of your computer. When the confirmation window appears, you can close it.
  8. Step 8 Open the “Applications” folder on your Mac.
    8
    Open the “Applications” folder on your Mac. Now you’ll run a quick test from a terminal window to make sure the installation was successful. You can get to this folder by clicking “Go” and selecting “Applications.”
  9. Step 9 Open the “Utilities” folder.
    9
    Open the “Utilities” folder. Here you’ll see a list of system utilities.
  10. Step 10 Double-click the “Terminal” app.
    10
    Double-click the “Terminal” app. Now you’ll see the command prompt.
  11. Step 11 Type javac -version and press ⏎ Return.
    11
    Type javac -version and press ⏎ Return. Just beneath the command you ran, you should see the JDK version number you installed (e.g. “1.8.0.1”). This means the installation was successful and you can get to your coding.
    • Once you’ve made sure the installation is successful, you can delete the DMG installer file you downloaded to conserve hard drive space.
  12. Advertisement
Part 4
Part 4 of 5:

Installing from an Archive on Linux or Solaris

PDF download Download Article
  1. Step 1 Open a terminal window.
    1
    Open a terminal window. If you downloaded an archived tarball of the JDK ("jdk-13.0.2_linux-x64_bin.tar.gz" or similar), use this method to complete the installation.
    • This method assumes you know how to use basic Unix shell commands.
    • If you downloaded a .rpm package file instead of a tarball, see Installing the JDK from a Package on Linux.
  2. Step 2 Navigate to the directory where you'd like to install the JDK.
    2
    Navigate to the directory where you'd like to install the JDK. You can install the JDK in any directory for which you have “write” permissions. Note that only the root user can install the JDK to a system directory.[10]
  3. Step 3 Use the mv command to get the archive into the current directory.
    3
    Use the mv command to get the archive into the current directory. This allows you to move the file into the current folder.
  4. Step 4 Unzip and install the JDK.
    4
    Unzip and install the JDK. The command is different depending on your operating system (and in the case of Solaris, the processor type). Once installed, a new directory called "jdk<version>” will be created in the current directory. In these examples, replace the name of the *.tar.gz file with the name of the one you downloaded.[11]
    • Linux: tar zxvf jdk-7u<version>-linux-i586.tar.gz
    • Solaris (SPARC): gzip -dc jdk-8uversion-solaris-sparcv9.tar.gz | tar xf -
    • Solaris (x64/EM64T): gzip -dc jdk-8uversion-solaris-x64.tar.gz | tar xf -
  5. Step 5 Delete the *.tar.gz file.
    5
    Delete the *.tar.gz file. Use the rm command to delete the archive file if you want to conserve disk space.
  6. Advertisement
Part 5
Part 5 of 5:

Installing from a Package on Linux

PDF download Download Article
  1. Step 1 Become root.
    1
    Become root. If you're using an RPM-based Linux system (such as SuSE or RedHat), you can install the Java Development Kit from an RPM package. Make sure you've downloaded the You'll need to su to root (su root) so that you have the correct permission to install the package.[12]
    • The file you downloaded should end with ".rpm"
    • This method assumes you know how to use basic Unix shell commands.
  2. Step 2 Remove earlier JDK package installations.
    2
    Remove earlier JDK package installations. The command is rpm -e <package_name>
  3. Step 3 Install the new package.
    3
    Install the new package. You'll be using the "rpm" command again, but this time with different flags:
    • rpm -ivh jdk-7u<version>-linux-x64.rpm (replace "jdk-7u<version>-linux-x64.rpm" with the actual package name)
  4. Step 4 Delete the .rpm file.
    4
    Delete the .rpm file. When the package is finished installing, you'll be returned to the command line. If you want to conserve disk space, you can delete the downloaded package file with the rm command.
  5. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Is there an easier way to download Java?
    Community Answer
    Community Answer
    The easiest way is to download it directly from Oracle, as linked above.
    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow
    Yes No
    Not Helpful 0 Helpful 5
  • Question
    What can I do if I've followed all the steps and I'm still getting a "Java is not recognized" message?
    Community Answer
    Community Answer
    This message usually appears when there's a problem with environment variables in Windows. Reboot your computer and try the test once more. If you get the same message, double-check the steps that involve setting environment variables and make sure you followed them exactly--and remember, they require you installing the kit with all of the default settings.
    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow
    Yes No
    Not Helpful 5 Helpful 3
  • Question
    I followed all the steps in the article but it does not work. What do I do?
    Community Answer
    Community Answer
    It depends on what's not working. If you are getting an error about Java not being installed, it's likely an issue with the environment variables in Windows. You may just need to reboot to refresh them. If it's still not working, start the process again and follow the instructions here from top to bottom.
    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow
    Yes No
    Not Helpful 5 Helpful 3
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Submit
Thanks for submitting a tip for review!

You Might Also Like

Install Java on Linux
How to
Install Java on Linux
Install Java
How to
Install Java
Set Java Home
How to
Set JAVA_HOME for JDK & JRE: A Step-by-Step Guide
Install Java in Ubuntu Using Terminal
How to
Install Java in Ubuntu Using Terminal
Install Oracle Java JRE on Ubuntu Linux
How to
Install Oracle Java JRE on Ubuntu Linux
Install Oracle Java on Ubuntu Linux
How to
Install Oracle Java on Ubuntu Linux
Install Tomcat on WindowsThe Best Way to Install Apache Tomcat on Windows
Compile & Run Java Program Using Command PromptA Beginner’s Guide to Compiling & Running Java Programs
Java Macos Uninstall
How to
Uninstall Java & JDK on Mac: Step-by-Step Tutorial
Update Java
How to
Update or Download Java on PC, Mac, or Linux
Check Your Java Version in the Windows Command Line
How to
Check Your Java Version in the Windows Command Line
Download, Install, and Run JDK and Eclipse
How to
Download, Install, and Run JDK and Eclipse
Program in Java
How to
Program in Java
Run Eclipse
How to
Run Eclipse
Advertisement

References

  1. ↑ https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. ↑ https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html
  3. ↑ https://www.youtube.com/watch?v=Wp6uS7CmivE
  4. ↑ https://www.youtube.com/watch?v=cSRSlo4Hj2A
  5. ↑ https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html
  6. ↑ https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html
  7. ↑ https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html
  8. ↑ https://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html
  9. ↑ https://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html
More References (3)
  1. ↑ https://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html
  2. ↑ https://docs.oracle.com/javase/8/docs/technotes/guides/install/solaris_jdk.html
  3. ↑ https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFJHFDD

About This Article

Travis Boylls
Written by:
Travis Boylls
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Travis Boylls. Travis has been a tech writer at wikiHow for more than 10 years. He has also worked in technical support for Dish Network and AT&T Wireless. He studied graphic design and web design at Pikes Peak Community College. He specializes in Windows, macOS, Linux, Android, iOS, and video game consoles. Travis has had a fascination with computers and technology that goes all the way back to childhood. He is proficient in all manner of software and computer operating systems. This article has been viewed 566,411 times.
How helpful is this?
Co-authors: 24
Updated: February 19, 2024
Views: 566,411
Categories: Install & Uninstall Software
Article SummaryX

1. Go to the Java Software Development Kit website.
2. Click DOWNLOAD under the "JDK" heading.
3. Sign in or create a new Oracle account.
4. Check the "Accept License Agreement" box, then select your operating system's link.
5. Double-click the downloaded installation file.
6. Follow the on-screen installation instructions. On Windows and Linux, you must set the JDK path as well.

Did this summary help you?
In other languages
Spanish
Portuguese
Russian
Chinese
French
Indonesian
Arabic
Japanese
  • Print
  • Send fan mail to authors
Thanks to all authors for creating a page that has been read 566,411 times.

Is this article up to date?

Advertisement
Cookies make wikiHow better. By continuing to use our site, you agree to our cookie policy.
Travis Boylls
Written by:
Travis Boylls
wikiHow Technology Writer
Click a star to vote
Co-authors: 24
Updated: February 19, 2024
Views: 566,411

Quizzes & Games

IQ Test
IQ Test
Take Quiz
Am I Smarter Than a High Schooler Quiz
Am I Smarter Than a High Schooler Quiz
Take Quiz
IQ Test For Kids
IQ Test For Kids
Take Quiz
General Knowledge Quiz
General Knowledge Quiz
Take Quiz

You Might Also Like

Install Java on Linux
How to
Install Java on Linux
Install Java
How to
Install Java
Set Java Home
How to
Set JAVA_HOME for JDK & JRE: A Step-by-Step Guide
Install Java in Ubuntu Using Terminal
How to
Install Java in Ubuntu Using Terminal

Trending Articles

Guess My Gender Quiz
Guess My Gender Quiz
What Would I Go to Jail For?
What Would I Go to Jail For?
Am I a Mogger or a Moggee?
Am I a Mogger or a Moggee?
What Will My Future Be Like?
What Will My Future Be Like?

Trending Articles

Am I in Love or Lust?
Am I in Love or Lust?
What's Your Red Flag Quiz
What's Your Red Flag Quiz
Am I His Type?
Am I His Type?
Am I Hot Quiz
Am I Hot Quiz

Take the Quiz. Face the Truth. 🔥

Am I Chopped Quiz
Am I Chopped Quiz
How Rare Is My Birthday Quiz
How Rare Is My Birthday Quiz
Am I Gay Quiz
Am I Gay Quiz
Do I Have ADHD?
Do I Have ADHD?

Which One Are You? 👀

Pirate Samurai Cowboy Quiz
Pirate Samurai Cowboy Quiz
Am I Omnisexual?
Am I Omnisexual?
Am I Demiromantic Quiz
Am I Demiromantic Quiz
Am I More Like Sam or Dean?
Am I More Like Sam or Dean?

Featured Videos

Print on T‐Shirts
How to
Print on T‐Shirts
Play Chess
How to
Play Chess
What Is a Voided Check and How Do You Use One?
What Is a Voided Check and How Do You Use One?
Wondering if Someone Likes You Online? 11 Important Signs to Watch Out For
Wondering if Someone Likes You Online? 11 Important Signs to Watch Out For

Impossible Choices 😩

One Has to Go: Food Edition
One Has to Go: Food Edition
One Has to Go: Music Edition
One Has to Go: Music Edition
One Has to Go: Movie Edition
One Has to Go: Movie Edition
Weird Would You Rather: What Do You Choose?
Weird Would You Rather: What Do You Choose?

Your Daily Dose of Fun!

Which Fictional Character Would Crush On You?
Which Fictional Character Would Crush On You?
Rate My Personality Quiz
Rate My Personality Quiz
What Do Your Hands Say About You?
What Do Your Hands Say About You?
Do You Agree with These Ridiculous Hot Takes?
Do You Agree with These Ridiculous Hot Takes?


wikiHow
  • Categories
  • Computers and Electronics
  • Software
  • Install & Uninstall Software
© 2026 wikiHow, Inc. All rights reserved. Use of site content is subject to our Terms of Use.
wikiHow Newsletter
You're all set!
Helpful how-tos delivered to
your inbox every week!
Sign me up!
By signing up you are agreeing to receive emails according to our privacy policy.
  • Home
  • About wikiHow
  • Experts
  • Jobs
  • Contact Us
  • Site Map
  • Terms of Use
  • Privacy Policy
  • Do Not Sell or Share My Info
  • Not Selling Info
  • Contribute

Follow Us

wikiHow Tech Help Pro:

Level up your tech skills and stay ahead of the curve

Let's go!
X

-
-
954