cannot run javac command  
Author Message
stef





PostPosted: 2006-11-23 11:32:00 Top

java-programmer, cannot run javac command Hi,

Complete newbie to Java.

I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the tutorial.
No problems with using Netbeans--but can't compile the hello world prog
using command line.

I also want to write the program from scratch using text editor.

That's done but when I go to javac helloworldapp.java as system does
not recognize command "javac"

Error message: Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>javac
'javac' is not recognized as an internal or external command,
operable program or batch file.

C:\>

Here is my Class path: .;C:\Program
Files\Java\jre1.5.0_06\lib\ext\QTJava.zip

QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip

I'm sure I'm doing something wrong here....

Any help?

Thanks!
--

 
Luc The Perverse





PostPosted: 2006-11-23 13:59:00 Top

java-programmer >> cannot run javac command "stef" <email***@***.com> wrote in message
news:email***@***.com...
> Hi,
>
> Complete newbie to Java.
>
> I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the tutorial.
> No problems with using Netbeans--but can't compile the hello world prog
> using command line.
>
> I also want to write the program from scratch using text editor.
>
> That's done but when I go to javac helloworldapp.java as system does
> not recognize command "javac"
>
> Error message: Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\>javac
> 'javac' is not recognized as an internal or external command,
> operable program or batch file.
>
> C:\>
>
> Here is my Class path: .;C:\Program
> Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip

How can a zip file be your class path?

:)


 
stef





PostPosted: 2006-11-23 14:19:00 Top

java-programmer >> cannot run javac command On Thu, 23 Nov 2006 03:32:12 +0000, stef wrote:

> Hi,
>
> Complete newbie to Java.
>
> I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the tutorial.
> No problems with using Netbeans--but can't compile the hello world prog
> using command line.
>
> I also want to write the program from scratch using text editor.
>
> That's done but when I go to javac helloworldapp.java as system does not
> recognize command "javac"
>
> Error message: Microsoft Windows XP [Version 5.1.2600] (C) Copyright
> 1985-2001 Microsoft Corp.
>
> C:\>javac
> 'javac' is not recognized as an internal or external command, operable
> program or batch file.
>
> C:\>
>
> Here is my Class path: .;C:\Program
> Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> I'm sure I'm doing something wrong here....
>
> Any help?
>
> Thanks!

oops.... didn't realize it was a common problem. it is now fixed.
http://java.sun.com/j2se/1.4.2/install-windows.html#Environment
 
 
stef





PostPosted: 2006-11-23 14:21:00 Top

java-programmer >> cannot run javac command On Wed, 22 Nov 2006 21:58:38 -0800, Luc The Perverse wrote:

> "stef" <email***@***.com> wrote in message
> news:email***@***.com...
>> Hi,
>>
>> Complete newbie to Java.
>>
>> I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the tutorial.
>> No problems with using Netbeans--but can't compile the hello world prog
>> using command line.
>>
>> I also want to write the program from scratch using text editor.
>>
>> That's done but when I go to javac helloworldapp.java as system does
>> not recognize command "javac"
>>
>> Error message: Microsoft Windows XP [Version 5.1.2600]
>> (C) Copyright 1985-2001 Microsoft Corp.
>>
>> C:\>javac
>> 'javac' is not recognized as an internal or external command,
>> operable program or batch file.
>>
>> C:\>
>>
>> Here is my Class path: .;C:\Program
>> Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>>
>> QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> How can a zip file be your class path?
>

No idea. I didn't specifically set it that way. I guess this happened
It's under systems variable.

during Java install....
 
 
Kunkhmer





PostPosted: 2006-11-23 16:02:00 Top

java-programmer >> cannot run javac command 'javac' is not recognized ...
at this point, there's nothing to do with your class path.

first you need to add this "C:\Program Files\Java\jre1.5.0_06\bin" to
your environment path
to set it do the follwing
- right click on My Computer > Properties > Advanced
- click on Environment Variables
- under system variable click "New"
- Variable Name = JAVA_HOME
- Variable value = C:\Program Files\Java\jre1.5.0_06
- click OK
- Scroll down to find "Path" in variable column
- Select and click Edit
- Add this string to the end of the line ";%JAVA_HOME%\bin"
- click OK
- re-open your dos screen (cmd)
- now javac should work


On Nov 23, 2:32 pm, "stef" <email***@***.com> wrote:
> Hi,
>
> Complete newbie to Java.
>
> I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the tutorial.
> No problems with using Netbeans--but can't compile the hello world prog
> using command line.
>
> I also want to write the program from scratch using text editor.
>
> That's done but when I go to javac helloworldapp.java as system does
> not recognize command "javac"
>
> Error message: Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\>javac
> 'javac' is not recognized as an internal or external command,
> operable program or batch file.
>
> C:\>
>
> Here is my Class path: .;C:\Program
> Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> I'm sure I'm doing something wrong here....
>
> Any help?
>
> Thanks!
> --

 
 
rebi





PostPosted: 2006-11-23 17:53:00 Top

java-programmer >> cannot run javac command Hai,


first U have to set the path.
for example
c:\>jdk5.0\bin\ur folder>set path=c:\jdk5.0\bin


stef wrote:
> Hi,
>
> Complete newbie to Java.
>
> I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the tutorial.
> No problems with using Netbeans--but can't compile the hello world prog
> using command line.
>
> I also want to write the program from scratch using text editor.
>
> That's done but when I go to javac helloworldapp.java as system does
> not recognize command "javac"
>
> Error message: Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\>javac
> 'javac' is not recognized as an internal or external command,
> operable program or batch file.
>
> C:\>
>
> Here is my Class path: .;C:\Program
> Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>
> I'm sure I'm doing something wrong here....
>
> Any help?
>
> Thanks!
> --

 
 
stef





PostPosted: 2006-11-24 2:40:00 Top

java-programmer >> cannot run javac command Kunkhmer wrote:

> 'javac' is not recognized ...
> at this point, there's nothing to do with your class path.
>
> first you need to add this "C:\Program Files\Java\jre1.5.0_06\bin" to
> your environment path
> to set it do the follwing
> - right click on My Computer > Properties > Advanced
> - click on Environment Variables
> - under system variable click "New"
> - Variable Name = JAVA_HOME
> - Variable value = C:\Program Files\Java\jre1.5.0_06
> - click OK
> - Scroll down to find "Path" in variable column
> - Select and click Edit
> - Add this string to the end of the line ";%JAVA_HOME%\bin"
> - click OK
> - re-open your dos screen (cmd)
> - now javac should work
>
>
> On Nov 23, 2:32 pm, "stef" <email***@***.com> wrote:
> > Hi,
> >
> > Complete newbie to Java.
> >
> > I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the
> > tutorial. No problems with using Netbeans--but can't compile the
> > hello world prog using command line.
> >
> > I also want to write the program from scratch using text editor.
> >
> > That's done but when I go to javac helloworldapp.java as system does
> > not recognize command "javac"
> >
> > Error message: Microsoft Windows XP [Version 5.1.2600]
> > (C) Copyright 1985-2001 Microsoft Corp.
> >
> > C:\>javac
> > 'javac' is not recognized as an internal or external command,
> > operable program or batch file.
> >
> > C:\>
> >
> > Here is my Class path: .;C:\Program
> > Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
> >
> > QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
> >
> > I'm sure I'm doing something wrong here....
> >
> > Any help?
> >
> > Thanks!
> > --

Hi,

Thanks a lot. I had found a reference here:
http://java.sun.com/j2se/1.4.2/install-windows.html#Environment to add
D:\Program Files\Java\jdk1.5.0_09\bin to the Current User variable (the
path for current user, i.e. me) and had done so and it had worked.

*However*, I like your suggestion better which makes it available for
all users; and feel it is a more proper way of gong about it.

Thanks!

--

 
 
ahmed khalak





PostPosted: 2006-11-24 14:32:00 Top

java-programmer >> cannot run javac command hi
I had same problem....
QTjava.zip file is file .. loaded when you install quicktime+ipod...
as was suggested by Bart Cremer I corrected my Path..
first thing is your jdk1... should come very first... inthe path e.g. Path
= C:\program files\JAva sdk1.5.0_09\bin....... etc
Classpath I was told to remove but I did like Classpath = .;

and solved the problem

hope this can help you..
a. khalak
"rebi" <email***@***.com> wrote in message
news:email***@***.com...
> Hai,
>
>
> first U have to set the path.
> for example
> c:\>jdk5.0\bin\ur folder>set path=c:\jdk5.0\bin
>
>
> stef wrote:
>> Hi,
>>
>> Complete newbie to Java.
>>
>> I installed JDK 5.0 Update 9 with NetBeans 5.5 and started the tutorial.
>> No problems with using Netbeans--but can't compile the hello world prog
>> using command line.
>>
>> I also want to write the program from scratch using text editor.
>>
>> That's done but when I go to javac helloworldapp.java as system does
>> not recognize command "javac"
>>
>> Error message: Microsoft Windows XP [Version 5.1.2600]
>> (C) Copyright 1985-2001 Microsoft Corp.
>>
>> C:\>javac
>> 'javac' is not recognized as an internal or external command,
>> operable program or batch file.
>>
>> C:\>
>>
>> Here is my Class path: .;C:\Program
>> Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>>
>> QTJAVA C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>>
>> I'm sure I'm doing something wrong here....
>>
>> Any help?
>>
>> Thanks!
>> --
>