Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default 'javac' is not recognized as an internal or external command

    Hey

    I'm a student and I am trying to learn Java!!
    When I want to compile some code by using "javac" I am getting the message 'javac' is not recognized as an internal or external command"

    I have installed the Java Developers Kit a few times and I have had a look at my system variables but still no joy :-(

    Can some please please please have a look at the system variables below and let me know if you can see any problems. (I am running Windows Vista 64x)

    CLASSPASTH .;%JAVA_HOME%
    ComSpec %SystemRoot%\system32\cmd.exe
    Path %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Program Files (x86)\QuickTime\QTSystem\

    Many thanks to anyone who can help!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default

    For the windows OS to find/recognize a program without using a complete path, the program must be on the system PATH as contained in the environment variable PATH. There have been posts here on how to set the environment variable. I think its the same in Vista but am not sure.

    The other choice is to use the full path to the command when you use it. That'll get old but it will work.

  3. #3
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by Norm View Post
    For the windows OS to find/recognize a program without using a complete path, the program must be on the system PATH as contained in the environment variable PATH. There have been posts here on how to set the environment variable. I think its the same in Vista but am not sure.

    The other choice is to use the full path to the command when you use it. That'll get old but it will work.
    I have tired looking at the system variables all night and I cant get it to compile any code :-(

    This may sound cheeky but please forgive me!
    Would you be willing to do a remote desktop connect and see if you can spot anything wrong?

    This would be gratefully appreciated.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default

    Have you tried: use the full path to the command when you use it.

    Control panel|system|advanced|environment variables
    Add the path to the jdk's \bin folder to PATH

    Easy way to get the path: go to \bin folder, RC javac.exe and create shortcut. RC shortcut, select properties and copy the path shown to the CB (remove the javac.exe part). Then paste it in PATH variable.
    Last edited by Norm; 10-18-2008 at 02:54 AM.

Similar Threads

  1. Replies: 28
    Last Post: 10-26-2010, 04:39 AM
  2. javac command not recognized
    By sunshine39 in forum New To Java
    Replies: 7
    Last Post: 03-04-2009, 03:54 AM
  3. Replies: 6
    Last Post: 07-30-2008, 03:50 AM
  4. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 12:23 AM
  5. Replies: 4
    Last Post: 07-20-2007, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •