Increase JVM memory used by tomcat in eclipse

Source: Internet
Author: User

DebuggingProgramJava heap space is always insufficient. Many methods on the Internet to increase JVM memory, such as modifying Tomcat startup scripts and environment variables, are ineffective.

 

Why is it invalid.

 

Create an observation webpage, Mem. jsp

  1. <B>Mem</B><BR>
  2. Total:<% = Runtime. getruntime (). totalmemory () %>Free:<% = Runtime. getruntime (). freememory () %>MAX:<% = Runtime. getruntime (). maxmemory () %>
  3. <HR>

After running, it is found that the maximum JVM memory is 64 MB, and more than 30 mb is used after the program starts.

 

You can modify the environment variables in run dialog. Unfortunately, the result observed in MEM. jsp is still 64 MB.

 

Note that there is an arguments option, with a total of VM arugements. The setting is successful!

 

 

The value D before the parameter indicates that the parameter is to be uploaded to the VM.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.