Debugging basics and some link - Java

Some simple debugging tools related to Java. These are for those who are new to Java.

1. Application is crashing : Most miserable one. Get your log file, try to analysis log. How to write log file, use Java Logger API.  Java Logger had been introduced in JDK 1.4.2. The most awesome feature of Logger API is that you can use it in production without much overhead. The overhead is controlled by something called level in API. Level goes from FINEST to SEVERE. You can refer to O'Relly Book "Java, In a NutShell". I guess, it covers Logging API into a great detail.

Lot many things to know: Standalone application is crashing or web application. Its crashing with -client or -server option, appletviewer or browser, plugin or plugin2. 

2. Application Hang: Most prominent reason for Hang is thread related. I don't know too many language but Java handles thread in most graceful way. What we can do when a Java Process or Application Hang:

    - Hmm, get stack trace at Java and native level.
    - Get to know current thread conditions and their status.
    - Try to get core dump. Sometime, application will refuse to give you.
    - Get to know machine detail. Almost all OS, use different thread model. Not only that in Solaris, 8 and 9 use different models. Sometime, it narrow down the problem, if you are luck :).

How to get all these information. Easy actually. Take help of Java Debugger, jdb(which is a part of JDK). In jdb, you can run the command like threads, thread, dump and many more. Take help of Windbg, if its a windows machine for native level. I find it useful and painful.

3. Your application is drinking memory: There is some memory leak. Best is to use jhat(part of JDK). First take a heap dump by using jmap, jconsole hprof. Pass that heap dump to jhat and it will bring a server and

dump all the information. Analyze where most of the memory is going. Writing to track the place from where memory is going. What is GC response on it. Change some arguments of GC and then give a try.


There are lot of JDK tools that help in analyzing JVM, threads, memory, process. See the list : http://java.sun.com/javase/6/docs/technotes/tools/

Garbage collector play important role in all of them, so always get to know what is best for what:- http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html (Even you know less about GC, you can't resist yourself finishing this page, this is so interesting). In terms of GC, everything is improving day be day and we have new GC, Garbage First aka G1 ready. With Vikram, I had one presentation on G1 in Sun tech days - http://developers.sun.com/events/techdays/presentations/locations-2009/hyderabad/td_hyd_garbagcollector_aroskar_choudhary.pdf.

If you have any wired debugging story related to Java, please share :). Also, visit Visual VM which is meant to integrate all the command line tools of JDK.

Comments:

mbt sneakers m walk
mbt sneakers chapa
mbt sneakers lami
mbt masai shoes
mbt barabara mens shoes
mbt chapa sneakers
mens mbt m walk sky
mens mbt m walk silver
mens mbt m walk pink
mens mbt m walk black
mens mbt m walk white
mens mbt chapa water
mens mbt chapa ebony
mens mbt chapa black
mens mbt chapa gtx stone
mens mbt chapa gtx black
mens mbt chapa caviar black
mens mbt sport black
mens mbt safiri chill
mens mbt safiri navy

Posted by mbt shoes on December 30, 2009 at 06:53 AM IST #

iam a fan of <a href="http://www.cheap-mbt-shoes.com/men-mbt-shoes-men-mbt-sport-shoes-c-65_73.html" title="Mbt shoes">Mbt shoes</a> shoes iam crazy for them but the price is too high to afford i save up for a while my friend recommed www.cheap-mbt-shoes.com to me as she have bought a pair of <a href="http://www.cheap-mbt-shoes.com/women-mbt-shoes-women-mbt-sport-shoes-c-66_70.html">cheap mbt shoes</a> from the guys do anyone have shopped with them and how do you think about it? also recently i have heard that is hot do anyone buy <a href="http://www.cheap-mbt-shoes.com/women-mbt-shoes-c-66.html" title="discount mbt shoes for sale">discount mbt shoes for sale</a>?
iam a fan of <a href="http://www.christianlouboutin-mall.com/christian-louboutin-boots-c-12" title="Christian louboutin boots">Christian louboutin boots</a> iam crazy for <a href="http://www.christianlouboutin-mall.com/christian-louboutin-shoes-c-10" title="Christian louboutin shoes">Christian louboutin shoes</a> but the price is too high to afford i save up for a while my friend recommed www.christianlouboutin-mall.com to me as she have bought a pair of <a href="http://www.christianlouboutin-mall.com/christian-louboutin-pumps-c-13" title="Christian louboutin pumps">Christian louboutin pumps</a> from the guys do anyone have shopped with them and how do you think about it? also recently i have heard that is hot do anyone buy <a href="http://www.christianlouboutin-mall.com/christian-louboutin-sandals-c-14" title="Christian louboutin sandals">Christian louboutin sandals</a>?

Posted by mbt shoes fashion on January 14, 2010 at 01:05 AM IST #

aa
[urltp://www.kissnfl.com/nfl-jerseys-c-631.html][b]authentic football jerseys[/b][/url]
[url=http://www.kissnfl.com][b]authentic jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]authentic nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]authentic nhl jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]buy nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]cheap football jerseys[/b][/url]
[url=http://www.kissnfl.com][b]cheap jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]cheap nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]cheap nhl jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]chicago blackhawks nhl[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]custom football jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]custom nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]customized nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]discount nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]discount nhl jerseys[/b][/url]
[url=http://www.kissnfl.com][b]hockey jerseys[/b][/url]
[url=http://www.kissnfl.com][b]jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl authentic[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl football jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl jersey[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl memorabilia[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl replica jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl store[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl stores[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]nfl youth[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl apparel[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl hockey[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl hockey apparel[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl hockey jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl jersey[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl new jersey devils[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl player[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl shop[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl store[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl team[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl teams[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]nhl vintage[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]penguins jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]red wings nhl[/b][/url]
[url=http://www.kissnlf.com][b]replica jerseys[/b][/url]
[url=http://www.kissnfl.com/][b]saints jerseys[/b][/url]
[url=http://www.kissnfl.com/][b]sports apparel[/b][/url]
[url=http://www.kissnfl.com/][b]sports jerseys[/b][/url]
[url=http://www.kissnfl.com/][b]steeler jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]stitched nfl jerseys[/b][/url]
[url=http://www.kissnfl.com/][b]team jerseys[/b][/url]
[url=http://www.kissnfl.com/nhl-jerseys-c-659.html][b]vintage nhl jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]wholesale nfl[/b][/url]
[url=http://www.kissnfl.com][b]youth jerseys[/b][/url]
[url=http://www.kissnfl.com/nfl-jerseys-c-631.html][b]youth nfl jerseys[/b][/url]

Posted by kissnfl on January 14, 2010 at 01:26 AM IST #

www.prettyreplica.com
www.verynicebag.com
www.watchesbroker.com
www.buynnicewatch.com
www.watchesbroker.com
www.hotpopbag.com
www.bestwathes.com
www.watchesbroker.com/specials.html
www.prettyreplica.com/specials.html

Posted by prettyreplica.com on January 20, 2010 at 12:27 PM IST #

http://www.ladyshoesstore.com/

Posted by manolo shoes on February 27, 2010 at 12:38 PM IST #

http://www.victoriawear.com

Posted by sexy wear on March 04, 2010 at 12:31 AM IST #

http://www.enjoyebay.com discount wholesale
http://www.enjoywholesale.com china wholesale

Posted by sexy wear on March 04, 2010 at 12:31 AM IST #

http://www.mbthome.net mbt shoes
http://www.hotsexywear.net sexy wear

Posted by sexy wear on March 04, 2010 at 12:33 AM IST #

http://www.homybuy.com

Posted by sexy wear on March 04, 2010 at 12:34 AM IST #

http://www.christianlouboutinmarts.com

Christian Louboutin
Christian Louboutin Shoes
christian louboutin sale
Christian Louboutin Boots
Christian Louboutin Pumps
Christian Louboutin Sandals

http://www.toptiffanylinks.com

tiffany wholesale
tiffany stores
replica tiffany
cheap jewelry
replica tiffany retail
pandora jewelry
replica pandora jewelry

http://www.ed-onlineshop.com

ed hardy
ed hardy clothing
ed hardy t shirt
ed hardy jeans
wholesale ed hardy
ed hardy shirt
ed hardy boots

http://www.edhardydream.com

ed hardy swimwear
ed hardy clothing
ed hardy clothes
ed hardy t shirts
ed hardy jeans
ed hardy bags
ed hardy caps
ed hardy sunglasses
ed hardy sunglass

Posted by china wholesale on March 07, 2010 at 01:37 AM IST #

I would like to introduce a very good company, electronic products dealer.
I have bought some products from company,the price was very cheap,and the products are very good quality!They accept paypal, credit card transactions,bank transfers,and more.Just have a look at this web page : http://www.nike-airyeezy.com
I am sure you will could save a lot of money!
Best regards!
web: http://www.victoriawear.com
http://www.homybuy.com

Posted by wwwnice on March 09, 2010 at 06:02 AM IST #

Post a Comment:
Comments are closed for this entry.
About

Hi, I am Vaibhav Choudhary working in Sun. This blog is all about simple concept of Java and JavaFX.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today