Java外文翻译programminglanguage教程文件文档格式.docx

上传人:b****6 文档编号:16309095 上传时间:2022-11-22 格式:DOCX 页数:9 大小:25.84KB
下载 相关 举报
Java外文翻译programminglanguage教程文件文档格式.docx_第1页
第1页 / 共9页
Java外文翻译programminglanguage教程文件文档格式.docx_第2页
第2页 / 共9页
Java外文翻译programminglanguage教程文件文档格式.docx_第3页
第3页 / 共9页
Java外文翻译programminglanguage教程文件文档格式.docx_第4页
第4页 / 共9页
Java外文翻译programminglanguage教程文件文档格式.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

Java外文翻译programminglanguage教程文件文档格式.docx

《Java外文翻译programminglanguage教程文件文档格式.docx》由会员分享,可在线阅读,更多相关《Java外文翻译programminglanguage教程文件文档格式.docx(9页珍藏版)》请在冰豆网上搜索。

Java外文翻译programminglanguage教程文件文档格式.docx

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.

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

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

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1