anchor.diff:  If you do not allocate sufficient memory to a Java app when you deploy it, it may fail to start, or <%= vars.app_runtime_abbr %> may terminate it. You must allocate enough memory to allow for:
   
   * Java heap
  -* Metaspace, if using Java 8
  -* PermGen, if using Java 7 or earlier
  +* Metaspace
   * Stack size per Thread
   * JVM overhead
   
   The `config/open_jdk_jre.yml` file of the Java buildpack contains default memory size and weighting settings for the JRE. For an explanation of JRE memory sizes and weightings and how the Java buildpack calculates and allocates memory to the JRE for your app, see [Open JDK JRE](https://github.com/cloudfoundry/java-buildpack/blob/main/docs/jre-open_jdk_jre.md) in the Cloud Foundry Java Buildpack on GitHub.
   
  -To configure memory-related JRE options for your app, either create a custom buildpack and specify this buildpack in your deployment manifest, or override the default memory settings of your buildpack as described in [Configuration and Extension](https://github.com/cloudfoundry/java-buildpack#configuration-and-extension) with the properties listed in the Open JDK JRE README in the Cloud Foundry Java Buildpack on GitHub. For more information about configuring custom buildpacks and manifests, see [Custom Buildpacks](../custom.html) and [Deploying with App Manifests](../../devguide/deploy-apps/manifest.html).
  +To configure memory-related JRE options for your app you may override the default memory settings of your buildpack as described in [Configuration and Extension](https://github.com/cloudfoundry/java-buildpack#configuration-and-extension) with the properties listed in the Open JDK JRE README in the Cloud Foundry Java Buildpack on GitHub. For more information about configuring manifests, see [Deploying with App Manifests](../../devguide/deploy-apps/manifest.html).
   
   To see memory utilization when your app is running, run:
   
  
positive.code: 
      This error appears when the JVM allocates more OS-level memory than the quota requested by the app, such as through the manifest.
  
  * **Cause 1 - Insufficient native memory**: This error commonly means that the JVM requires more `native` memory. In the scope of the Java buildpack and the memory calculator, the term `native` means the memory required for the JVM to work, along with forms of memory not covered in the other classifications of the memory calculator. This includes the memory footprint of OS-level threads, direct NIO buffers, code cache, program counters, and others.
  
  * **Solution 1**: Determine how much `native` memory a Java app needs by measuring it with realistic workloads and fine-tuning it accordingly. You can then configure the Java buildpack using the `native` setting of the memory calculator, as in the example below:
  
  
negative.code: As an example, pushing a WAR file that is bound to a PostgreSQL database and New Relic for performance monitoring results in the following:
  
  <pre class="terminal">
  -----> Java Buildpack v4.50 | https://github.com/cloudfoundry/java-buildpack#e1d6dbc
  -----> Downloading Jvmkill Agent 1.16.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/bionic/x86_64/jvmkill-1.16.0-RELEASE.so (0.1s)
  -----> Downloading Open Jdk JRE 1.8.0_342 from https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/bellsoft-jre8u342%2B7-linux-amd64.tar.gz (0.6s)
  Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.3s)
  JVM DNS caching disabled in lieu of BOSH DNS caching
  -----> Downloading Open JDK Like Memory Calculator 3.13.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/bionic/x86_64/memory-calculator-3.13.0-RELEASE.tar.gz (0.1s)
  Loaded Classes: 21014, Threads: 250
  -----> Downloading Client Certificate Mapper 1.11.0_RELEASE from https://java-buildpack.cloudfoundry.org/client-certificate-mapper/client-certificate-mapper-1.11.0-RELEASE.jar (0.0s)
  -----> Downloading Container Security Provider 1.19.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-security-provider/container-security-provider-1.19.0-RELEASE.jar (0.1s)
  Exit status 0
  </pre>
  
  
  ## <a id='configuration'></a> Configuration
  
  In most cases, the buildpack should work without any configuration. If you are new to <%= vars.app_runtime_abbr %>, <%= vars.recommended_by %> recommends that you make your first attempts without modifying the buildpack configuration. The buildpack is flexible though and can be configured through environment variables. For more information, see [Configuration and Extension](https://github.com/cloudfoundry/java-buildpack#configuration-and-extension) in the Cloud Foundry Java Buildpack repository on GitHub.
  
  
  ## <a id='java-client-library'></a> Java Client Library
  
  The Cloud Foundry Client Library provides a Java API for interacting with a <%= vars.app_runtime_abbr %> instance. This library, `cloudfoundry-client`, can be used by Java-based tools to interact with the platform.
  
  For information about using this library, see [Java Cloud Foundry Library](./java-client.html).
  
  