|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Java伴随着互联网的迅猛发展而发展,逐渐成为重要的网络编程语言。Oracle收购Sun后Java前途未卜。观点固然如今内容丰厚了良多,也不再范围于applet,可是原汁原味的sandbox,仍旧值得回味。
AsecuritymeasureintheJavadevelopmentenvironment.ThesandboxisasetofrulesthatareusedwhencreatinganappletthatpreventscertainfunctionswhentheappletissentaspartofaWebpage.WhenabrowserrequestsaWebpagewithapplets,theappletsaresentautomaticallyandcanbeexecutedassoonasthepagearrivesinthebrowser.Iftheappletisallowedunlimitedaccesstomemoryandoperatingsystemresources,itcandoharminthehandsofsomeonewithmaliciousintent.Thesandboxcreatesanenvironmentinwhichtherearestrictlimitationsonwhatsystemresourcestheappletcanrequestoraccess.Sandboxesareusedwhenexecutablecodecomesfromunknownoruntrustedsourcesandallowtheusertorununtrustedcodesafely.
TheJavasandboxreliesonathree-tiereddefense.Ifanyoneofthesethreeelementsfails,thesecuritymodeliscompletelycompromisedandvulnerabletoattack:
bytecodeverifier--ThisisonewaythatJavaautomaticallychecksuntrustedoutsidecodebeforeitisallowedtorun.WhenaJavasourceprogramiscompiled,itcompilesdowntoplatform-independentJavabytecode,whichisverifiedbeforeitcanrun.Thishelpstoestablishabasesetofsecurityguarantees.
appletclassloader--AllJavaobjectsbelongtoclasses,andtheappletclassloaderdetermineswhenandhowanappletcanaddclassestoarunningJavaenvironment.TheappletclassloaderensuresthatimportantelementsoftheJavarun-timeenvironmentarenotreplacedbycodethatanapplettriestoinstall.
securitymanager--ThesecuritymanagerisconsultedbycodeintheJavalibrarywheneveradangerousoperationisabouttobecarriedout.Thesecuritymanagerhastheoptiontovetotheoperationbygeneratingasecurityexception.
那这个对象有什么意义?现在很多用javabean的人就不能保证对象有完整的意义,不成熟的使用模式等导致代码疯狂增长,调试维护的时间要得多得多。在说性能之前,先说说你这个比较的来历。据说微软为了证明。net比java好。 |
|