Java – Graphs and Charts

How to draw graphs and charts

1. If you want to generate bmp, jpg formats better to use Better with Swing or to email images. Better for JSP/Servlet integration.

2. For more detailed research, Excel is best. Create template with graphs and fill the data using Apache POI API.

3. For better quick online graphs try following


Java – Performance Monitoring

Problem: One method is taking 30 seconds. How can we bring it down to the minimal?

First we need to identify all the code (methods) executed.
Get the time took by each method. So that we can troubleshoot one at a time.

How to do this?

1. Simple solution: Using difference of start time and end time.
We can’t use this always. This is not production quality code and we can’t litter the code with all these methods and calculations.

2. Using API level code

3. Using Monitors. This is best way to test distributed installations.

– – –

java.lang.IllegalArgumentException: SSL

INFO: Interceptor has thrown exception, unwinding now
java.lang.IllegalArgumentException: SSL


Before: parameters.setSecureSocketProtocol(“SSL”);

After: parameters.setSecureSocketProtocol(“SSLv3”);