It won't compile !!

W

Ward Loockx

Hello ,

I'm @ the beginning of programmers school and in school we compile our
programs with simple "javac filename" in dos. Now I wanted to compile
a program @ my place but it always says this :

C:\Documents and Settings\Ward Loockx>javac
javac wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.

in english it means : javac isn't recognized as a internal or external
task , program or batch...

Now everything is in my dir, like we have in school ..

What can be the problem ?
 
M

Michael Saunby

Ward Loockx said:
Hello ,

I'm @ the beginning of programmers school and in school we compile our
programs with simple "javac filename" in dos. Now I wanted to compile
a program @ my place but it always says this :

C:\Documents and Settings\Ward Loockx>javac
javac wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.

in english it means : javac isn't recognized as a internal or external
task , program or batch...

Now everything is in my dir, like we have in school ..

What can be the problem ?

You'll get the same response if you type "wibble", "wobble", or anything
else that doesn't exist on your system. Try installing the Java SDK
http://java.sun.com and then you'll have a working javac command, and more.

Michael Saunby
 
A

Alex Potter

Ward said:
Hello ,

I'm @ the beginning of programmers school and in school we compile our
programs with simple "javac filename" in dos. Now I wanted to compile
a program @ my place but it always says this :

C:\Documents and Settings\Ward Loockx>javac
javac wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.

in english it means : javac isn't recognized as a internal or external
task , program or batch...

Now everything is in my dir, like we have in school ..

What can be the problem ?

You haven't correctly installed java on your machine,

See
http://java.sun.com/j2se/1.4.2/install.html
or
http://java.sun.com/j2se/1.5.0/install.html

dependign on the version you have/will install.
 
A

Andrew Thompson


Please do not use silly abbreviations such as 'u', or '@'.
..the beginning of programmers school ..

A better group for beginners is described here..
..and in school we compile our
programs with simple "javac filename" in dos.

Again, for the sake of clarity, DOS.
.. Now I wanted to compile
a program @ my place but it always says this :

C:\Documents and Settings\Ward Loockx>javac
javac wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.

in english it means : javac isn't recognized as a internal or external
task , program or batch...

You need to set the path to the 'javac' command..
On my system it is..
C:\Program Files\Java\j2sdk1.5.0\bin\"

So I put a file at C:\javainit.bat that reads..

if not defined JAVA_HOME set JAVA_HOME="C:\Program
Files\Java\j2sdk1.5.0\bin\\"

...all one line.

Then create a file such as xCompile.bat in the directory
with the Java source files.

call C:\javainit.bat
%JAVA_HOME%javac *.java

[ Note that I have set the follow-ups to the help group referred
to above, if you need to make replies, follow them there.. ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
 
L

Lee Weiner

Hello ,

I'm @ the beginning of programmers school and in school we compile our
programs with simple "javac filename" in dos. Now I wanted to compile
a program @ my place but it always says this :

C:\Documents and Settings\Ward Loockx>javac
javac wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.

in english it means : javac isn't recognized as a internal or external
task , program or batch...

Now everything is in my dir, like we have in school ..

What can be the problem ?

If you've installed the JDK, you haven't added the JDK bin directory to your
PATH. The instructions are in the install.html file that is available where
you downloaded the JDK.

Lee Weiner
lee AT leeweiner DOT org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top