Oracle's Java Development Kit (JDK) is the essential toolkit for Java development. It is not a simple app but a full suite: the Java runtime environment, development tools, and source code for Java's core class libraries. The Java Runtime Environment (JRE) has a simpler role — it is purely a runtime. In short, any Java-written program needs the JRE to run on your machine. Whether you do traditional Java development or hot Android development, you must install the JRE. Java's contribution and influence on software development are hard to match.
\ \
thisisverymanyJavafirstlearn-erallwill困惑targetquestions。itssolidareaminuteitpluralverysimple,thenseeyoutargeteyetarget:
\ \youcanholdopenhairJavaprogramwant toelephantbecomedodish:
\ \simplesay,JDK = JRE + openhairtoolscollection。
keypoint:JRE notincludingtaskwhatopenhairtools,like编译machine、adjust试machineetc.。itcan“transportline”,notcan“createcreate”。
installgoodJDKback,doletsystemintaskwhatpositionhandleallcanknowdistinguishJavafate令,mustmatchhandleenvironmentchangequantity。usingpart 2isdetailedstep-by-step:
\ \In the next 'environment variables' window, we work in two areas: 'user variables' and 'system variables'. Usually recommended to"System Variables"areaenterlinematchhandle,thiswaypairplacehasusedoorlifeeffect。
\ \JAVA_HOMEC:\\Program Files\\Java\\jdk1.8.0_311(pleasetaskmust根accordingyousolidedgeinstalltargetversioncopysignmodifyroad径)CLASSPATH.;%JAVA_HOME%\\lib\\dt.jar;%JAVA_HOME%\\lib\\tools.jar;\
\
(notemeaningmostfrontfacehasapointsignandminutesign .;,this代surfacecurrenteyerecord,veryheavywant!)
in“systemchangequantity”linesurfacemid,findtonamedo Path targetchangequantity,selectmidit,afterbackclick“edit”。
\ \%JAVA_HOME%\\bin (thisismostcommon、mostrulemodeltargetwritemethod,leadusejustonlysettingstargetJAVA_HOMEchangequantity)C:\\Program Files\\Java\\jdk23.0_2\\bin (thisisJDKtargetbineyerecord绝pairroad径,show例versioncopysign)C:\\Program Files\\Java\\jre23.0_2 (thisisJREtargetinstalleyerecord,show例versioncopysign)thisismostkeytarget1step,checkinvestigatedIpluraltargetmatchhandleis否lifeeffect:
\ \cmd,afterbackaccording toreplaycar,fromopenfate令promptsymbolwindowmouth。java -version,afterbackaccording toreplaycar。likeresultmatchhandlejustaccurate,youwillseetokindlikepart 2facetarget输out,显showyouinstalltargetJavaversioncopybelieverest:
\ \java version "1.8.0_311"\
Java(TM) SE Runtime Environment (build 1.8.0_311-b13)\
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b13, mixed mode)\
\
seetothis,then恭喜you!youtargetJavaopenhairenvironment已classicbecomeworkset upgood。
\ \understandJDKandJREtargetareadistinguishislearnJavatarget1step,andjustaccuratematchhandleenvironmentchangequantityruleiswilltheory付诸solid践targetkeyoperations。marklivecoreoriginalrule:openhairoutfitJDK,transportlineoutfitJRE;matchhandletime盯紧JAVA_HOMEandPathCarefully follow the above steps and you'll clear Java's first little hurdle, laying a solid base for the programming journey ahead.
\ \ \ \