Java Basics and JDK Overview – Transcript Notes
Java Basics and Ecosystem
- Java is one of the most popular programming languages widely used for building desktop, mobile, and web applications.
- It is free and open source and has a huge community following and support.
- The latest version of Java as of this recording is 13.0.2.
- In work environments, you might find a lot of applications dependent on different versions of Java, and it's not unlikely to see a lot of organizations stuck at version 8.
Version History and Naming
- Version nine introduced changes that made many popular tools and libraries incompatible at the time, which prevented many companies from upgrading their infrastructure.
- These changes, along with some licensing changes, resulted in many applications being stuck at version 8 of Java.
- Older versions before 9 used the 1.x naming scheme (e.g., 1.5,1.6,1.7,1.8).
- From 9 onwards, the naming changed to 9,10,11,12,13,<br/>13,etc.;don’tconfuse1.8with8.</li><li>Thecurrentexampleshownis13.0.2.</li></ul><h3id="jdkjreandopenjdk">JDK,JRE,andOpenJDK</h3><ul><li>ThereleasepageindicatesJDKavailability.ThedownloadedfilesarenamedJDK.</li><li>TheversionsaysOpenJDKonthereleasepage.</li><li>WhatisaJDK?JDKstandsforJavaDevelopmentKit:asetoftoolsthatwillhelpyoudevelop,build,andrunJavaapplicationsonasystem.</li><li>Youdon’tjustinstallJava;youinstallakitthatenablesdevelopment,building,andrunning.</li><li>TodevelopaJavaapplication,youcanreallyjustuseanytexteditortowritethecode.</li><li>Todebugyourapplication,youhavetheJavadebuggertool(e.g.,jdb).</li><li>Todocumentyoursourcecode,youhavetheJavadoctool(javadoc).</li><li>Tobuildandcompileyourapplication,youhavetheJavacompiler(javac).</li><li>TheJARtoolhelpsarchivethecodeandrelatedlibrariesintoasingleJARfile(jar).</li><li>Oncethesourcecodeisdeveloped,toruntheapplicationyouneedtheJavaRuntimeEnvironment(JRE).</li><li>AJavaRuntimeEnvironmentistheruntimeneededtorunaJavaapplicationonanygivensystem.</li><li>TheJavacommandlineutilityortheloaderisusedtoruntheapplication.</li><li>AllofthesetoolstogetherformtheJavaDevelopmentKit(JDK).</li><li>ThesetoolsarecommandsavailableinthebindirectorywhenyouinstallJava;whatwelistedherearejustafewofthemanytoolsintheJDK.</li><li>It′simportanttonotethatinthepast,before9,JDKandJREwereshippedasseparatecomponents.Youcouldinstallthesecomponentsindividually.</li><li>IfyouwerenotdevelopingaJavaapplicationandjustwantedtorunanexistingfullybuiltapplication,youcouldinstallonlytheJREandruntheapplication.</li><li>Youwouldseeseparatedirectoriesofinstallationforeachcomponent.</li><li>From9onwards,bothJDKandJREarepackagedtogetherintoasingleJavaDevelopmentKitpackage.</li><li>SowhenyouinstallJDK,youinstallalltoolsaswellastheJavaruntimeenvironment.</li></ul><h3id="installationverificationandbasiclabsetup">Installation,Verification,andBasicLabSetup</h3><ul><li>YoucandownloadJavafromtheOraclewebsite.</li><li>InLinuxenvironmentslikeCentOS(asusedinourlab),youdownloadtheJavabuildusingautilitylikewgetandextractittoadirectory.</li><li>ThebindirectorywithintheextractedfoldercontainsalltheJavabinaryfiles.</li><li>TocheckifJavaisinstalledortochecktheversion,runthecommandjava -version.</li><li>Thecurrentversionshownintheexampleis13.0.2.</li></ul><h3id="buildprocessruntimeandfuturetopics">BuildProcess,Run−Time,andFutureTopics</h3><ul><li>Thelabmentionsthatwewillseehowthebuildprocessworksandseeitinactioninupcominglectures.</li><li>TheruntimeenvironmentistheonlycomponentyouneedtosimplyrunabuiltJavaapplicationonanysystem,alongwiththeJavacommandlineutility/loaderusedtoruntheapplication.</li><li>AllofthesetoolstogetherformtheJDK,locatedinthebindirectoryafterinstallation.</li></ul><h3id="labpracticeandrealworldrelevance">LabPracticeandReal−WorldRelevance</h3><ul><li>Inthelabsyou’llhavemultiplesystems;you’llinstallJava,explorethedifferentversions,andrunbasicJavaprograms.</li><li>Therearepracticalimplicationsinreal−worldcontexts:licensingchangesandbackwardcompatibilityinfluenceupgradedecisionsinorganizations,contributingtoinertiaaroundupgradingfrom8tonewerversions.</li><li>TheJavaecosystemincludesalargesetoftoolsandlibraries,socompatibilityconsiderationsareimportantinenterpriseenvironments.</li></ul><h3id="clarificationsandcommonpointers">ClarificationsandCommonPointers</h3><ul><li>Pre9versionsusedthe1.xnaming(e.g.,1.5, 1.6, 1.7, 1.8);9+usesthe9, 10, 11, 12, 13naming.</li><li>JDKincludesbothdevelopmenttoolsandtheruntime;JREistheruntimeenvironment.</li><li>Since9,JDKandJREarepackagedtogetherinasingleJavaDevelopmentKitpackage.</li></ul><h3id="realworldcontextandpracticalimplications">Real−WorldContextandPracticalImplications</h3><ul><li>TheJavaecosystembenefitsfromalargecommunityandongoingsupport,butorganizationsoftenclingto8$$ due to long-term support and licensing factors.
- A strong open-source variant (OpenJDK) is commonly referenced on release pages, alongside Oracle’s distributions.
- Think of the JDK as a toolbox for building and running Java programs; the JRE is the runtime engine that actually executes the programs; OpenJDK refers to the open-source implementation you may encounter in release notes.
Next Steps
- The next lecture will cover builds in Java with hands-on practice.