Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / September 2005

Tip: Looking for answers? Try searching our database.

heap

Thread view: 
Flatman - 21 Sep 2005 09:45 GMT
Hi,

I need to start my app with
 java -Xmx500m -jar myapp.jar

I'd like to ask for the heap-size at the beginning of my app (eventually
catching an Exception) so that users can start the app with :

 open myapp.jar (MACOSX)

or by double clicking the icon ...

Is this possible ?

Signature

Erik

Roedy Green - 21 Sep 2005 17:45 GMT
>I need to start my app with
>  java -Xmx500m -jar myapp.jar
>
>I'd like to ask for the heap-size at the beginning of my app (eventually
>catching an Exception) so that users can start the app with :

You need a kicker. You can't change those parameters once the app
itself has started.

See http://mindprod.com/projects/kicker.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Flatman - 22 Sep 2005 10:48 GMT
|  
| You need a kicker. You can't change those parameters once the app
| itself has started.

That's what I was fearing :-(
Why is it Java does not allow to specify heap size at the beginning of
the app ???

Signature

Erik

Roedy Green - 22 Sep 2005 11:57 GMT
>Why is it Java does not allow to specify heap size at the beginning of
>the app ???

because it has to set up a virtual memory map before it can do
anything.   If you change that, you pretty well have to start all over
allocating where you are going to put things in virtual RAM and how
you are going to parcel it out for various purposes.

I had a similar problem in Abundance  which internally is not that
different from a JVM.  I did allow dynamic reconfiguration, and it was
quite a production to move everything and adjust every pointer in the
universe, and rehash everything.  There is a lot more stuff in there
than just the Java objects.  the system has to continue working while
you are busy adjusting it.  It is  a bit like repairing an engine
while driving down the freeway.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.