How to write a coding using eclipse. what r the configurations need to execute java program in system.

RTFM. There is a lot of eclipse support on the Internet as well on the Eclipse web site.

If you are a beginner (which is obvious from the question) then forget Eclipse. Eclipse is a very powerful massively complex tool for experts. It has its own learning curve every bit as long as the learning curve for Java itself.

Just download the JDK from Oracle, find a text editor you like, and start codong some very simple programs.

Go here and click "download jar file via http". Then open a terminal and go to the directory where the file drjava... has been downloaded. Then type

java -jar drjava*

In the window that opens, write

public class HelloWorld {
    public static void main(String[] args) { 
        System.out.println("Hello, World");
    }
}

Click Compile, save as HelloWorld.java. Click Run.