Giving exceptions to a java rule from grammar.xml

Is there any way to give exception to a java rule from XML file??? Please let me know if there is any.

No, but there’s a way to filter XML rule matches using Java code as documeted at Development Overview - LanguageTool Wiki