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.213.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 88.

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 88 of Java.
  • Older versions before 99 used the 1.x naming scheme (e.g., 1.5,1.6,1.7,1.81.5, 1.6, 1.7, 1.8).
  • From 99 onwards, the naming changed to 9,10,11,12,13,<br/>9, 10, 11, 12, 13, <br />13,etc.;dontconfuse, etc.; don’t confuse1.8withwith8.</li><li>Thecurrentexampleshownis.</li> <li>The current example shown is13.0.2.</li></ul><h3id="jdkjreandopenjdk">JDK,JRE,andOpenJDK</h3><ul><li>ThereleasepageindicatesJDKavailability.Thedownloadedfilesarenamed.</li> </ul> <h3 id="jdkjreandopenjdk">JDK, JRE, and OpenJDK</h3> <ul> <li>The release page indicates JDK availability. The downloaded files are namedJDK.</li><li>TheversionsaysOpenJDKonthereleasepage.</li><li>WhatisaJDK?JDKstandsforJavaDevelopmentKit:asetoftoolsthatwillhelpyoudevelop,build,andrunJavaapplicationsonasystem.</li><li>YoudontjustinstallJava;youinstallakitthatenablesdevelopment,building,andrunning.</li><li>TodevelopaJavaapplication,youcanreallyjustuseanytexteditortowritethecode.</li><li>Todebugyourapplication,youhavetheJavadebuggertool(e.g.,.</li> <li>The version says OpenJDK on the release page.</li> <li>What is a JDK? JDK stands for Java Development Kit: a set of tools that will help you develop, build, and run Java applications on a system.</li> <li>You don’t just install Java; you install a kit that enables development, building, and running.</li> <li>To develop a Java application, you can really just use any text editor to write the code.</li> <li>To debug your application, you have the Java debugger tool (e.g.,jdb).</li><li>Todocumentyoursourcecode,youhavetheJavadoctool().</li> <li>To document your source code, you have the Java doc tool (javadoc).</li><li>Tobuildandcompileyourapplication,youhavetheJavacompiler().</li> <li>To build and compile your application, you have the Java compiler (javac).</li><li>TheJARtoolhelpsarchivethecodeandrelatedlibrariesintoasingleJARfile().</li> <li>The JAR tool helps archive the code and related libraries into a single JAR file (jar).</li><li>Oncethesourcecodeisdeveloped,toruntheapplicationyouneedtheJavaRuntimeEnvironment(JRE).</li><li>AJavaRuntimeEnvironmentistheruntimeneededtorunaJavaapplicationonanygivensystem.</li><li>TheJavacommandlineutilityortheloaderisusedtoruntheapplication.</li><li>AllofthesetoolstogetherformtheJavaDevelopmentKit(JDK).</li><li>Thesetoolsarecommandsavailableinthe).</li> <li>Once the source code is developed, to run the application you need the Java Runtime Environment (JRE).</li> <li>A Java Runtime Environment is the runtime needed to run a Java application on any given system.</li> <li>The Java command line utility or the loader is used to run the application.</li> <li>All of these tools together form the Java Development Kit (JDK).</li> <li>These tools are commands available in thebindirectorywhenyouinstallJava;whatwelistedherearejustafewofthemanytoolsintheJDK.</li><li>Itsimportanttonotethatinthepast,beforedirectory when you install Java; what we listed here are just a few of the many tools in the JDK.</li> <li>It's important to note that in the past, before9,JDKandJREwereshippedasseparatecomponents.Youcouldinstallthesecomponentsindividually.</li><li>IfyouwerenotdevelopingaJavaapplicationandjustwantedtorunanexistingfullybuiltapplication,youcouldinstallonlytheJREandruntheapplication.</li><li>Youwouldseeseparatedirectoriesofinstallationforeachcomponent.</li><li>From, JDK and JRE were shipped as separate components. You could install these components individually.</li> <li>If you were not developing a Java application and just wanted to run an existing fully built application, you could install only the JRE and run the application.</li> <li>You would see separate directories of installation for each component.</li> <li>From9onwards,bothJDKandJREarepackagedtogetherintoasingleJavaDevelopmentKitpackage.</li><li>SowhenyouinstallJDK,youinstallalltoolsaswellastheJavaruntimeenvironment.</li></ul><h3id="installationverificationandbasiclabsetup">Installation,Verification,andBasicLabSetup</h3><ul><li>YoucandownloadJavafromtheOraclewebsite.</li><li>InLinuxenvironmentslikeCentOS(asusedinourlab),youdownloadtheJavabuildusingautilitylikeonwards, both JDK and JRE are packaged together into a single Java Development Kit package.</li> <li>So when you install JDK, you install all tools as well as the Java runtime environment.</li> </ul> <h3 id="installationverificationandbasiclabsetup">Installation, Verification, and Basic Lab Setup</h3> <ul> <li>You can download Java from the Oracle website.</li> <li>In Linux environments like CentOS (as used in our lab), you download the Java build using a utility likewgetandextractittoadirectory.</li><li>Theand extract it to a directory.</li> <li>ThebindirectorywithintheextractedfoldercontainsalltheJavabinaryfiles.</li><li>TocheckifJavaisinstalledortochecktheversion,runthecommanddirectory within the extracted folder contains all the Java binary files.</li> <li>To check if Java is installed or to check the version, run the commandjava -version.</li><li>Thecurrentversionshownintheexampleis.</li> <li>The current version shown in the example is13.0.2.</li></ul><h3id="buildprocessruntimeandfuturetopics">BuildProcess,RunTime,andFutureTopics</h3><ul><li>Thelabmentionsthatwewillseehowthebuildprocessworksandseeitinactioninupcominglectures.</li><li>TheruntimeenvironmentistheonlycomponentyouneedtosimplyrunabuiltJavaapplicationonanysystem,alongwiththeJavacommandlineutility/loaderusedtoruntheapplication.</li><li>AllofthesetoolstogetherformtheJDK,locatedinthe.</li> </ul> <h3 id="buildprocessruntimeandfuturetopics">Build Process, Run-Time, and Future Topics</h3> <ul> <li>The lab mentions that we will see how the build process works and see it in action in upcoming lectures.</li> <li>The runtime environment is the only component you need to simply run a built Java application on any system, along with the Java command line utility/loader used to run the application.</li> <li>All of these tools together form the JDK, located in thebindirectoryafterinstallation.</li></ul><h3id="labpracticeandrealworldrelevance">LabPracticeandRealWorldRelevance</h3><ul><li>Inthelabsyoullhavemultiplesystems;youllinstallJava,explorethedifferentversions,andrunbasicJavaprograms.</li><li>Therearepracticalimplicationsinrealworldcontexts:licensingchangesandbackwardcompatibilityinfluenceupgradedecisionsinorganizations,contributingtoinertiaaroundupgradingfromdirectory after installation.</li> </ul> <h3 id="labpracticeandrealworldrelevance">Lab Practice and Real-World Relevance</h3> <ul> <li>In the labs you’ll have multiple systems; you’ll install Java, explore the different versions, and run basic Java programs.</li> <li>There are practical implications in real-world contexts: licensing changes and backward compatibility influence upgrade decisions in organizations, contributing to inertia around upgrading from8tonewerversions.</li><li>TheJavaecosystemincludesalargesetoftoolsandlibraries,socompatibilityconsiderationsareimportantinenterpriseenvironments.</li></ul><h3id="clarificationsandcommonpointers">ClarificationsandCommonPointers</h3><ul><li>Preto newer versions.</li> <li>The Java ecosystem includes a large set of tools and libraries, so compatibility considerations are important in enterprise environments.</li> </ul> <h3 id="clarificationsandcommonpointers">Clarifications and Common Pointers</h3> <ul> <li>Pre9versionsusedtheversions used the1.xnaming(e.g.,naming (e.g.,1.5, 1.6, 1.7, 1.8););9+usestheuses the9, 10, 11, 12, 13naming.</li><li>JDKincludesbothdevelopmenttoolsandtheruntime;JREistheruntimeenvironment.</li><li>Sincenaming.</li> <li>JDK includes both development tools and the runtime; JRE is the runtime environment.</li> <li>Since9,JDKandJREarepackagedtogetherinasingleJavaDevelopmentKitpackage.</li></ul><h3id="realworldcontextandpracticalimplications">RealWorldContextandPracticalImplications</h3><ul><li>TheJavaecosystembenefitsfromalargecommunityandongoingsupport,butorganizationsoftenclingto, JDK and JRE are packaged together in a single Java Development Kit package.</li> </ul> <h3 id="realworldcontextandpracticalimplications">Real-World Context and Practical Implications</h3> <ul> <li>The Java ecosystem benefits from a large community and ongoing support, but organizations often cling to8$$ due to long-term support and licensing factors.
  • A strong open-source variant (OpenJDK) is commonly referenced on release pages, alongside Oracle’s distributions.

Extra Metaphor and Practical Insight

  • 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.