Memory issues in Java Gui

12 views
Skip to first unread message

RVince

unread,
Apr 13, 2011, 6:12:27 AM4/13/11
to Leverage Space Trading
I've received a couple of questions along the same lines of late, and
am posting the answer here for later reference.

To alleviate the "Out of memory" errors in your java gui when you have
too many components * their scenarios, use the -Xmx and -Xms
parameters of java as shown below. The example below is an example
run.cmd file you might use . Note in the example below we are opening
it up to 512 megs, but, you canspecify as much as your system will
permit (also of note, the semicolons in the second line pertain to
Windows. Use straight colons for Linux variants):


java JarUpdater LSP.jar http://ralphvince.com/LSP.jar
java java -Xms512m -Xmx512m -classpath-classpath
LSP.jar;RalphVince.jar;jdom.jar;log4j.jar;TableLayout.jar
com.leveragespacemodel.LevarageSpaceModel pro=true plus=true
targetreturn=.0 zminusmin=-1.0

Ronald Brandt

unread,
Apr 13, 2011, 6:40:41 PM4/13/11
to leverage-sp...@googlegroups.com
Thanks, Ralph!   Sorry to be such a pain, but what are the exact steps I need to take to execute it.  (Note: I copied and pasted your code below to the DOS prompt and that did not work).

Best regards,
 
Ron 
 




> Date: Wed, 13 Apr 2011 03:12:27 -0700
> Subject: Memory issues in Java Gui
> From: rvin...@hotmail.com
> To: leverage-sp...@googlegroups.com

RVince

unread,
Apr 13, 2011, 7:23:47 PM4/13/11
to Leverage Space Trading
Ron, You mean you copied it to run.cmd, right? You may need to
allocate more than 512, perhaps 1024, even 2048 if your computer has
the memory for it -- maybe more! -Ralph

On Apr 13, 6:40 pm, Ronald Brandt <ronbran...@msn.com> wrote:
> Thanks, Ralph!   Sorry to be such a pain, but what are the exact steps I need to take to execute it.  (Note: I copied and pasted your code below to the DOS prompt and that did not work).
>
> Best regards,
>
> Ron
>
> > Date: Wed, 13 Apr 2011 03:12:27 -0700
> > Subject: Memory issues in Java Gui
> > From: rvinc...@hotmail.com
> > To: leverage-sp...@googlegroups.com
>
> > I've received a couple of questions along the same lines of late, and
> > am posting the answer here for later reference.
>
> > To alleviate the "Out of memory" errors in your java gui when you have
> > too many components * their scenarios, use the -Xmx and -Xms
> > parameters of java as shown below. The example below is an example
> > run.cmd file you might use . Note in the example below we are opening
> > it up to 512 megs, but, you canspecify as much as your system will
> > permit (also of note, the semicolons in the second line pertain to
> > Windows. Use straight colons for Linux variants):
>
> > java JarUpdater LSP.jarhttp://ralphvince.com/LSP.jar

Ronald Brandt

unread,
Apr 13, 2011, 7:26:45 PM4/13/11
to leverage-sp...@googlegroups.com
I got a reply from Roscoe after I sent that message to you, Ralph!  I edited the run.cmd file by deleting your old code and substituting your new code below.  The error message was "Could not find the main class: com.leveragespacemodel.LeverageSpaceModel.  Program will exit."  Roscoe is checking it out as we speak.

Best regards,
 
Ron 
 




> Date: Wed, 13 Apr 2011 16:23:47 -0700
> Subject: Re: Memory issues in Java Gui
> From: rvin...@hotmail.com
> To: leverage-sp...@googlegroups.com
Message has been deleted

RVince

unread,
Apr 13, 2011, 8:46:46 PM4/13/11
to Leverage Space Trading
Ah, they need the little "m"s after them, like so (my mistake, sorry):

java JarUpdater LSP.jar http://ralphvince.com/LSP.jar
java -Xmx512m -Xms512m -classpath
LSP.jar;RalphVince.jar;jdom.jar;log4j.jar;TableLayout.jar
com.leveragespacemodel.LevarageSpaceModel pro=true plus=true
targetreturn=.0 zminusmin=-1.0

On Apr 13, 8:09 pm, RVince <rvinc...@hotmail.com> wrote:
> Colon <-> semicolon issue in run.cmd
>
> On Apr 13, 7:26 pm, Ronald Brandt <ronbran...@msn.com> wrote:
>
> > I got a reply from Roscoe after I sent that message to you, Ralph!  I edited the run.cmd file by deleting your old code and substituting your new code below.  The error message was "Could not find the main class: com.leveragespacemodel.LeverageSpaceModel.  Program will exit."  Roscoe is checking it out as we speak.
>
> > Best regards,
>
> > Ron
>
> > > Date: Wed, 13 Apr 2011 16:23:47 -0700
> > > Subject: Re: Memory issues in Java Gui
> > > From: rvinc...@hotmail.com
Reply all
Reply to author
Forward
0 new messages