Java外文翻译programminglanguage教程文件.docx
- 文档编号:3403607
- 上传时间:2022-11-22
- 格式:DOCX
- 页数:9
- 大小:25.84KB
Java外文翻译programminglanguage教程文件.docx
《Java外文翻译programminglanguage教程文件.docx》由会员分享,可在线阅读,更多相关《Java外文翻译programminglanguage教程文件.docx(9页珍藏版)》请在冰豆网上搜索。
Java外文翻译programminglanguage教程文件
Java(programminglanguage)
FromWikipedia,thefreeencyclopedia
JavaisaprogramminglanguageoriginallydevelopedbyJamesGoslingatSunMicrosystems(whichhassincemergedintoOracleCorporation)andreleasedin1995asacorecomponentofSunMicrosystems'Javaplatform.ThelanguagederivesmuchofitssyntaxfromCandC++buthasasimplerobjectmodelandfewerlow-levelfacilities.Javaapplicationsaretypicallycompiledtobytecode(classfile)thatcanrunonanyJavaVirtualMachine(JVM)regardlessofcomputerarchitecture.Javaisageneral-purpose,concurrent,class-based,object-orientedlanguagethatisspecificallydesignedtohaveasfewimplementationdependenciesaspossible.Itisintendedtoletapplicationdevelopers"writeonce,runanywhere,"meaningthatcodethatrunsononeplatformdoesnotneedtobeeditedtorunonanother.Javaiscurrentlyoneofthemostpopularprogramminglanguagesinuse,particularlyforclient-serverwebapplications,withareported10millionusers.[10][11]TheoriginalandreferenceimplementationJavacompilers,virtualmachines,andclasslibrariesweredevelopedbySunfrom1995.AsofMay2007,incompliancewiththespecificationsoftheJavaCommunityProcess,SunrelicensedmostofitsJavatechnologiesundertheGNUGeneralPublicLicense.OthershavealsodevelopedalternativeimplementationsoftheseSuntechnologies,suchastheGNUCompilerforJavaandGNUClasspath.
Contents
1History
1.1Principles
1.2Versions
2Practices
2.1Javaplatform
2.1.1Implementations
2.1.2Performance
2.2Automaticmemorymanagement
History
Seealso:
Java(softwareplatform)#History
JamesGosling,MikeSheridan,andPatrickNaughtoninitiatedtheJavalanguageprojectinJune1991.[12]Javawasoriginallydesignedforinteractivetelevision,butitwastooadvancedforthedigitalcabletelevisionindustryatthetime.[13]ThelanguagewasinitiallycalledOakafteranoaktreethatstoodoutsideGosling'soffice;itwentbythenameGreenlater,andwaslaterrenamedJava,fromJavacoffee,saidtobeconsumedinlargequantitiesbythelanguage'screators.[14]GoslingaimedtoimplementavirtualmachineandalanguagethathadafamiliarC/C++styleofnotation.[15]
SunMicrosystemsreleasedthefirstpublicimplementationasJava1.0in1995.Itpromised"WriteOnce,RunAnywhere"(WORA),providingno-costrun-timesonpopularplatforms.Fairlysecureandfeaturingconfigurablesecurity,itallowednetwork-andfile-accessrestrictions.MajorwebbrowserssoonincorporatedtheabilitytorunJavaappletswithinwebpages,andJavaquicklybecamepopular.WiththeadventofJava2(releasedinitiallyasJ2SE1.2inDecember1998–1999),newversionshadmultipleconfigurationsbuiltfordifferenttypesofplatforms.Forexample,J2EEtargetedenterpriseapplicationsandthegreatlystripped-downversionJ2MEformobileapplications(MobileJava).J2SEdesignatedtheStandardEdition.In2006,formarketingpurposes,SunrenamednewJ2versionsasJavaEE,JavaME,andJavaSE,respectively.
In1997,SunMicrosystemsapproachedtheISO/IECJTC1standardsbodyandlatertheEcmaInternationaltoformalizeJava,butitsoonwithdrewfromtheprocess.[16]Javaremainsadefactostandard,controlledthroughtheJavaCommunityProcess.[17]Atonetime,SunmademostofitsJavaimplementationsavailablewithoutcharge,despitetheirproprietarysoftwarestatus.SungeneratedrevenuefromJavathroughthesellingoflicensesforspecializedproductssuchastheJavaEnterpriseSystem.SundistinguishesbetweenitsSoftwareDevelopmentKit(SDK)andRuntimeEnvironment(JRE)(asubsetoftheSDK);theprimarydistinctioninvolvestheJRE'slackofthecompiler,utilityprograms,andheaderfiles.
OnNovember13,2006,SunreleasedmuchofJavaasfreeandopensourcesoftware,(FOSS),underthetermsoftheGNUGeneralPublicLicense(GPL).OnMay8,2007,Sunfinishedtheprocess,makingallofJava'scorecodeavailableunderfreesoftware/open-sourcedistributionterms,asidefromasmallportionofcodetowhichSundidnotholdthecopyright.[18]
Sun'svice-presidentRichGreensaidthatSun'sidealrolewithregardstoJavawasasan"evangelist."[19]FollowingOracleCorporation'sacquisitionofSun
Microsystemsin2009–2010,Oraclehasdescribeditselfasthe"stewardofJavatechnologywitharelentlesscommitmenttofosteringacommunityofparticipationandtransparency".[20]Javasoftwarerunsonlaptopstodatacenters,gameconsolestoscientificsupercomputers.Thereare930millionJavaRuntimeEnvironmentdownloadseachyearand3billionmobilephonesrunJava.[21]OnApril2,2010,JamesGoslingresignedfromOracle.[22]
Principles
TherewerefiveprimarygoalsinthecreationoftheJavalanguage:
[23]
1.Itshouldbe"simple,object-orientedandfamiliar"
2.Itshouldbe"robustandsecure"
3.Itshouldbe"architecture-neutralandportable"
4.Itshouldexecutewith"highperformance"
5.Itshouldbe"interpreted,threaded,anddynamic"
Versions
Mainarticle:
Javaversionhistory
MajorreleaseversionsofJava,alongwiththeirreleasedates:
JDK1.0(January23,1996)
JDK1.1(February19,1997)
J2SE1.2(December8,1998)
J2SE1.3(May8,2000)
J2SE1.4(February6,2002)
J2EE5.0(September30,2004)
JavaSE6(December11,2006)
JavaSE7(July28,2011)
Practices
Javaplatform
Mainarticles:
Java(softwareplatform)andJavaVirtualMachine
OnecharacteristicofJavaisportability,whichmeansthatcomputerprogramswrittenintheJavalanguagemustrunsimilarlyonanyhardware/operating-systemplatform.ThisisachievedbycompilingtheJavalanguagecodetoanintermediaterepresentationcalledJavabytecode,insteadofdirectlytoplatform-specificmachinecode.Javabytecodeinstructionsareanalogoustomachinecode,butareintendedtobeinterpretedbyavirtualmachine(VM)writtenspecificallyforthehosthardware.End-userscommonlyuseaJavaRuntimeEnvironment(JRE)installedontheirownmachineforstandaloneJavaapplications,orinaWebbrowserforJavaapplets.
Standardizedlibrariesprovideagenericwaytoaccesshost-specificfeaturessuchasgraphics,threading,andnetworking.
Amajorbenefitofusingbytecodeisporting.However,theoverheadofinterpretationmeansthatinterpretedprogramsalmostalwaysrunmoreslowlythanprogramscompiledtonativeexecutableswould.Just-in-Timecompilerswereintroducedfromanearlystagethatcompilebytecodestomachinecodeduringruntime.
Implementations
SunMicrosystemsofficiallylicensedtheJavaStandardEditionplatformforLinux,[24]MacOSX,[25]andSolaris.InthepastSunlicensedJavatoMicrosoftbutthelicenseexpiredwithoutrenewal.[26]BecauseWindowsdoesnotshipwithaJavasoftwareplatform,anetworkofthird-partyvendorsandlicensees[27]developthemforWindowsandotheroperatingsystem/hardwareplatforms.
Sun'strademarklicenseforusageoftheJavabrandinsiststhatallimplementationsbe"compatible".ThisresultedinalegaldisputewithMicrosoftafterSunclaimedthattheMicrosoftimplementationdidnotsupportRMIorJNIandhadaddedplatform-specificfeaturesoftheirown.Sunsuedin1997,andin2001wonasettlementofUS$20million,aswellasacourtorderenforcingthetermsofthelicensefromSun.[28]Asaresult,MicrosoftnolongershipsJavawithWindows,andinrecentversionsofWindows,InternetExplorercannotsupportJavaappletswithoutathird-partyplugin.Sun,andothers,havemadeavailablefreeJavarun-timesystemsforthoseandotherversionsofWindows.
Platform-independentJavaisessentialtotheJavaEEstrategy,andanevenmorerigorousvalidationisrequiredtocertifyanimplementation.Thisenvironmentenablesportableserver-sideapplications,suchasWebservices,JavaServlets,andEnterpriseJavaBeans,aswellaswithembeddedsystemsbasedonOSGi,usingEmbeddedJavaenvironments.ThroughtheGlassFishproject,Sunisworkingtocreateafullyfunctional,unifiedopensourceimplementationoftheJavaEEtechnologies.
SunalsodistributesasupersetoftheJREcalledtheJavaDevelopmentKit(commonlyknownastheJDK),whichincludesdevelopmenttoolssuchastheJavacompiler,Javadoc,Jar,anddebugger.
Performance
Mainarticle:
Javaperformance
ProgramswritteninJavahaveareputationforbeingslowerandrequiringmorememorythanthosewritteninC.[29]However,Javaprograms'executionspeedimprovedsignificantlywiththeintroductionofJust-in-timecompilationin1997/1998forJava1.1,[30]theadditionoflanguagefeaturessupportingbettercodeanalysis(suchasinnerclasses,StringBufferclass,optionalassertions,etc.),andoptimizationsintheJavaVirtualMachineitself,suchasHotSpotbecomingthedefaultforSun'sJVMin2000.Currently(November2011),Java2.0codehasapproximatelyhalftheperformanceofCcode.[31]
SomeplatformsofferdirecthardwaresupportforJava;therearemicrocontrollersthatcanrunJavainhardwareinsteadofasoftwareJVM,andARMbasedprocessorscanhavehardwaresupportforexecutingJavabytecodethroughitsJazelleoption.
Automaticmemorymanagement
Javausesanautomaticgarbagecollectortomanagememoryintheobjectlifecycle.Theprogrammerdetermineswhenobjectsarecreated,andtheJavaruntimeisresponsibleforrecoveringthememoryonceobjectsarenolongerinuse.Oncenoreferencestoanobjectremain,theunreachablememorybecomeseligibletobefreedautomaticallybythegarbagecollector.Somethingsimilartoamemoryleakmaystilloccurifaprogrammer'scodeholdsareferencetoanobjectthatisnolongerneeded,typicallywhenobjectsthatarenolongerneededarestoredincontainersthatarestillinuse.Ifme
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Java 外文 翻译 programminglanguage 教程 文件