Skip to main content


4 replies [Last post]
Joined: 2010-06-07

Hello I want to start to learn Java, so I took some books and internet Web sites.

I installed the new jdk.1.6.0_20 in my computer its is in C:\Program Files\Java\jdk1.6.0-20

I created a file called as you can see below I saved the at the folder
C:\Program Files\Java\jdk1.6.0-20\bin

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

So I go to the DOS prompt at C:\Program Files\Java\jdk1.6.0-20\bin to compile by typing: javac

The computer return the msg.: error while writing HelloWorld: HelloWorld.class
public class HelloWorld (
1 error
Is anyone can help me what is going wrong, what should I do?


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-11-26

Maybe you do not have access to write in this folder

Joined: 2010-10-16

If you are looking for a document generation system on Java, take a look at this . It has basic info on all the vendors. It makes for a great starting point.Document generation is the most thorough and efficient means of automating documents, and without it, businesses would waste critical resources.

Joined: 2010-09-23

I would suggest you use a work directory, for example c:\mywork
and put all your stuffs in it. So you can keep the java directory clean.

Then, do from the dos prompt ::

cd \mywork
\Program Files\Java\jdk1.6.0-20\bin javac
then if everythink's OK :
java HelloWorld

Joined: 2010-09-23

Sorry, to execute you should type :

\Program Files\Java\jdk1.6.0-20\bin java HelloWorld