用JBuilder环境调试一步一步学Repast.ppt

上传人:zhu****ei 文档编号:3447559 上传时间:2019-12-14 格式:PPT 页数:11 大小:1.16MB
返回 下载 相关 举报
用JBuilder环境调试一步一步学Repast.ppt_第1页
第1页 / 共11页
用JBuilder环境调试一步一步学Repast.ppt_第2页
第2页 / 共11页
用JBuilder环境调试一步一步学Repast.ppt_第3页
第3页 / 共11页
点击查看更多>>
资源描述
1,BuildingtheCarryDropSimulationinJBuilderX,ByDeddyKoesrindartoto08/16/2004,2,Introduction,Thistutorialwillexplain,stepbystep,howtocreateanewprojectusingexistingRePast/JavacodeforaRePastTutorialbyJohnMurphy.TobeconsistentwithMurphysTutorial,theprojectnamewillbeDemo.jpx,anditwillcontainthreeJavaclass:CarryDropModel.java;CarryDropSpace.java;CarryDropAgent.java.Tofollowthistutorialyouwillneed:JBuilderXinstalledandrunningRePastlibraryinstalledAccesstothesourcecodeofJohnMurphysRePastTutorialat:http:/www.u.arizona.edu/jtmurphy/H2R/HowTo01.htm,3,CreatingaDemoProject,StartJBuilderXGotoFile-NewProjectIntheProjectWizarddialogbox(Fig2.A)fillintheprojectname.UseDemoasprojectname.InJBuilder,thisprojectnamewillalsobeusedasthepackagename.Leavethedefaultsettingsfortherestofthefields.,Fig1,4,CreatingaprojectDemocontinued:,Fig2.A,Fig2.B,InFig2.AclicktheNextbutton(1)toconfigurethelibrary/librariesthatwillbeusedinDemoproject.Dialogbox(Fig2.B)willappear.PresstheRequiredLibraries(2),andpressAddbuttontoproceed(3).Leavethedefaultsettingsfortherestofthefields.,(1),(2),(3),5,Settinguprequiredlibraries:,Fig3.A,Fig3.B,NavigatethroughthelistoflibrariesshowninFig3.A.SelectRePast-2.2library(1)andpresstheOKbutton(2).Thenewdialogbox(Fig.3.B)willacknowledgethattheRePast-2.2libraryhasbeenadded(3)totheDemoproject.Leavethedefaultsettingsfortherestofthefields,andclicktheFinishbutton(4).,(1),(2),(3),(4),6,SettinguprequiredlibrariesContinued:,Fig4,Atthispoint,theprocessofcreatingtheDemoprojectisfinished.Demo.jpxisnowlistedattheJBuilderprojectpane(1).However,theprojectisstillempty.Therearenoclassesassociatedwiththisproject.Thenextstepswillexplainhowtoaddclassestothisproject.,(1),7,AddingaJavaclasstotheDemoproject:,ThenextstepswillshowhowtoaddCarryDropModel.javaclassestotheDemoproject.GotoFile-NewClassAClassWizarddialogboxshouldappear.,Fig5,8,AddingaJavaclasstotheDemoproject.continued:,Fig6.A,AsshowninFig6.A,typeCarryDropModel(1)astheClassname,andleaveallothersettingsatdefaultvalues.Notethat,ifnothingischeckedintheOptionschoices(2),itwillgenerateanemptyclasswhichcontainsonlytheclassnameandtherespectivepackageusedinthisclass.Hitthe“OK”button(3)Fig6.BshowshowtheCarryDropModelclassnowappearsinthestructurepane(4).Meanwhile,theCarryDropModelsourcecodeappearsincontentpane(5).,9,CopyingMurphyssourcecodeforCarryDropModel.javafromhiswebsite:,Openyourbrowser,andgoto:http:/www.u.arizona.edu/jtmurphy/H2R/HowTo03.htm.SelectandcopythewholesourcecodefortheCarryDropModeltotheclipboard.,10,CopyingMurphyssourcecodeforCarryDropModel.javacontinued:,GotoJBuildercontentpaneofCarryDropModel.java.PressEdit-SelectAll(1)andthenEdit-Paste(2).ItwillautomaticallypastethecodeyoucopiedearlierfromthewebsiteforCarryDropModel.javaintothecontentpane.,11,AddingotherclassestotheDemoprojectcontinued:,RepeatthesameprocessforaddingcodefortheCarryDropSpaceandCarryDropAgentJavaclassesfromMurphyswebsite.Whenallthreeclassesareadded,theywillbelistedbynameinprojectpane(1)andtheircodewillbeshownincontentpane(2).FollowtheMurphyTutorialandmodifythesethree.javaclassesasneeded.,(1),(2),
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 课件教案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!