Can I get the source code of 'javac'? in my application,
Yes you can, just go the Official Site...
I have to identify the list of deprecated api's used and suggest alternative for the same. So if I get the source code, I would know how 'javac -deprecation' option works.
What do you mean? you will attempt to browse the C&C++ source code? It takes time if you will.... maybe a week i guess.... and maybe you cannot just understand it easily specially how to trace the specific function you are looking for.... unless you're a C++ Guru....
Also, please give any information if you know how IDE's like NetBeans identify these api's?
NetBeans refers to the src file that can be found inside the jdk folder.... all java built-in classes are there, with documentation comment.....
You can browse all the deprecated APIs there.... They are on documentation comments....