The following applies if you are running a console based multi-threaded Java application. You can get a full stack dump by pressing the following keys on your keyboard. Ctrl+Break
If you want to time the response time of your webrequests/proxies, etc using C# there is a easy way to do it. We need to use a stopwatch object as shown in the example.
If your Java application makes use of files using paths, it’s best not to use slash “/” or backslash “\” hard coded in your source code. Use the following to ensure your program would work as expected on both Windows and Unix like systems.
If you find that your Java application is running our of heap space and you don’t have a memory leak, you can give the JMV more memory. This is very simple to do by starting your java application with the following argument. You have three options for increasing size
If you do any socket programming on Java or use any library that does, there will come a time that you need to monitor the traffic going through your application. You will need the following class in order to see the traffic in Fiddler You can initialize the above class by the following
Here is a simple method that can compare the difference in seconds, minutes, hours and days.
Oracle Java has proven to be more stable than the OpenJDK, you can install it easily using apt-get with the following commands