Solved

Java alerts bloating memory

Posted on 2012-03-22
2
303 Views
Last Modified: 2012-08-13
Anybody has a way of setting a trigger for JAVA alerts on bloating the memory ?
0
Comment
Question by:leew781
2 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 37753815
You can determine the memory in Java in this way:
see this link
http://www.codebeach.com/2008/02/determine-available-memory-in-java.html

long maxMemory = runtime.maxMemory();  
long allocatedMemory = runtime.totalMemory();  
long freeMemory = runtime.freeMemory();  

So you can probably set up alerts by checking the free memory, if that is what you mean
0
 
LVL 7

Accepted Solution

by:
gudii9 earned 500 total points
ID: 37754241
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now