首页 > 编程知识 正文

eclipse中java配置(eclipse创建java)

时间:2023-05-06 03:32:30 阅读:76244 作者:4920

iamrunningaprogramthati ' vewritteninjavaineclipse.theprogramhasaverydeeplevelofrecursionforverylargeinputs.forsmallerinpure heprogramrunsfinehoweverwhenlargeinputsaregiven,I get the following error:

exceptioninthread ' main ' Java.lang.stack overflow error

canthisbesolvedbyincreasingthejavastacksizeandifso,how do I do this in Eclipse?

更新:

@谨慎的甜瓜,数据线Skeet

thecodeistraversingaparsetreerecursivelyinordertobuildupadatastructure.so, forexamplethecodewilldosomeworkusinganodeintheparsetreeandcallitselfonthenode ' stwo children,combiningtheirrresultstogivetheoheooode

thetotaldepthoftherecursiondependsonthesizeoftheparsetreebutthecodeseemstofail (withoutalargerstack ) whenthenumberofrecursiver

alsoi ' mprettysurethecodeisn ' tfailingbecauseofabugasitworksforsmallinputs。

解决方案

opentherunconfigurationforyourapplication (运行/运行配置应用程序.thenlookfortheapplicationsentryin ' Java应用程序'

theargumentstabhasatextboxvmarguments,enter-xss1m (orabiggerparameterforthemaximumstacksize ).thedefaultvalueis 512k byte

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。