after writing the codes and saving it..while i compile it in comand prompt it shows an error as 'javac file not found '

Did you download the JDK or just the JRE?
What OS are you using?

What is the full text of the command you entered ?
On windows: To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'

Paste here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.