Skip to content

hhontheim/java-memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java-Memory

Build Status Codacy Badge codecov

This is a simple Java application to show the runtime's current memory allocation to test JVM flags.

Getting started

How to run

To run this application simply download the .jar-file from the releases tab. I recommend downloading latest java-memory-x.x.x-jar-with-dependencies.jar as it contains all necessary dependencies.

How to build

To build this project on your own just run

mvn clean compile assembly:single

in the project's root. Then cd to the target-folder and there you go!

What to do

Try running the .jar from shell:

java -jar java-memory-x.x.x-jar-with-dependencies.jar

Look at the runtime's max memory. Now try using 4 GB of RAM:

java -Xmx4G -jar java-memory-x.x.x-jar-with-dependencies.jar

See the difference? 😄