Results 1 to 7 of 7
  1. #1
    dani_hays is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Can't get Java compiler to run/acknowledge its existence...

    I'm trying to run Java SE/JDK on Windows 8 (how I hate Windows 8...). Whenever I try to type javac (program name) into my cmd prompt, it gives me the following error:
    'javac' is not recognized as an internal or external command, operable program or batch file.

    this is what my cmd prompt says right now:

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

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

    C:\Users\Danielle\Documents\java>dir "C:\Program Files\Java\jdk 1.7.0_21"
    Volume in drive C is OS
    Volume Serial Number is 0250-DDB7

    Directory of C:\Program Files\Java

    File Not Found

    C:\Users\Danielle\Documents\java>dir "C:\Program Files\Java\jdk1.7.0_21"
    Volume in drive C is OS
    Volume Serial Number is 0250-DDB7

    Directory of C:\Program Files\Java\jdk1.7.0_21

    05/06/2013 07:48 PM <DIR> .
    05/06/2013 07:48 PM <DIR> ..
    05/06/2013 07:47 PM <DIR> bin
    04/04/2013 09:34 AM 3,409 COPYRIGHT
    05/06/2013 07:47 PM <DIR> db
    05/06/2013 07:47 PM <DIR> include
    05/06/2013 07:47 PM <DIR> jre
    05/06/2013 07:47 PM <DIR> lib
    05/06/2013 07:47 PM 41 LICENSE
    05/06/2013 07:47 PM 123 README.html
    05/06/2013 07:47 PM 451 release
    04/04/2013 09:34 AM 20,672,644 src.zip
    05/06/2013 07:47 PM 125,105 THIRDPARTYLICENSEREADME-JAVAFX.txt
    05/06/2013 07:47 PM 175,640 THIRDPARTYLICENSEREADME.txt
    7 File(s) 20,977,413 bytes
    7 Dir(s) 442,341,232,640 bytes free

    C:\Users\Danielle\Documents\java>javac -version
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\Danielle\Documents\java>javac-version
    'javac-version' is not recognized as an internal or external command,
    operable program or batch file.

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

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

    C:\Users\Danielle\Documents\java>echo %PATH%
    c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;C:
    \windows\system32;C:\windows;C:\windows\System32\W bem;C:\windows\System32\Window
    sPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\D
    AL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program F
    iles (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86
    )\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bi
    n\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Wi
    ndows Live\Shared;c:\program files\java\jdk 1.7.0_21\bin;

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

    C:\Users\Danielle\Documents\java>



    I only downloaded it earlier today, so you can say I'm pretty new at this.

    I've read through several (about 15) other threads with the same problem, but I'm not sure where I'm messing up at. I know I had to have done something wrong for it not to run correctly, I just don't know where...

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,435
    Blog Entries
    7
    Rep Power
    20

    Default Re: Can't get Java compiler to run/acknowledge its existence...

    You typed "program files" in the path environment variable instead of "Program Files" (capitalization matters).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    dani_hays is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Can't get Java compiler to run/acknowledge its existence...

    I noticed that as well. I went back to the environment variables and changed the path to: C:\Program Files\Java\jdk1.7.0_21\bin;
    But when I ran the path again, it still says I put them as lower case. And JAVAC still doesn't work.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,435
    Blog Entries
    7
    Rep Power
    20

    Default Re: Can't get Java compiler to run/acknowledge its existence...

    Quote Originally Posted by dani_hays View Post
    I noticed that as well. I went back to the environment variables and changed the path to: C:\Program Files\Java\jdk1.7.0_21\bin;
    But when I ran the path again, it still says I put them as lower case. And JAVAC still doesn't work.
    Quit your shell (cmd.exe) and restart it again; it is still working with the previous path value.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    dani_hays is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Can't get Java compiler to run/acknowledge its existence...

    Is there another way I can change the path, other than going through cntl panel, systems and security, system, advanced settings, advanced, environment variables?

    or will it even matter?

  6. #6
    dani_hays is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Can't get Java compiler to run/acknowledge its existence...

    so that helped. now it says this:

    Microsoft Windows [Version 6.2.9200]
    (c) 2012 Microsoft Corporation. All rights reserved.

    C:\Users\Danielle>javac HelloWorld.java
    javac: file not found: HelloWorld.java
    Usage: javac <options> <source files>
    use -help for a list of possible options

    C:\Users\Danielle>cd java
    The system cannot find the path specified.

    C:\Users\Danielle>md java

    C:\Users\Danielle>cd java

    C:\Users\Danielle\java>javac
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are u
    sed
    -classpath <path> Specify where to find user class files and annotati
    on processors
    -cp <path> Specify where to find user class files and annotati
    on processors
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -proc:{none,only} Control whether annotation processing and/or compil
    ation is done.
    -processor <class1>[,<class2>,<class3>...] Names of the annotation processors
    to run; bypasses default discovery process
    -processorpath <path> Specify where to find annotation processors
    -d <directory> Specify where to place generated class files
    -s <directory> Specify where to place generated source files
    -implicit:{none,class} Specify whether or not to generate class files for
    implicitly referenced files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release

    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -Akey[=value] Options to pass to annotation processors
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system
    -Werror Terminate compilation if warnings occur
    @<filename> Read options and filenames from file


    C:\Users\Danielle\java>javac HelloWorld.java
    javac: file not found: HelloWorld.java
    Usage: javac <options> <source files>
    use -help for a list of possible options

    C:\Users\Danielle\java>java HelloWorld
    Error: Could not find or load main class HelloWorld

    C:\Users\Danielle\java>

  7. #7
    dani_hays is offline Member
    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Default Re: Can't get Java compiler to run/acknowledge its existence...

    Never mind. I believe my HelloWorld.java file has disappeared... I'll just recreate it. Thank you for your help!

Similar Threads

  1. Replies: 2
    Last Post: 02-05-2013, 03:35 PM
  2. what is the name of java compiler???
    By manishdablu in forum New To Java
    Replies: 7
    Last Post: 05-07-2012, 09:54 PM
  3. AOT Java compiler
    By N00Bie in forum New To Java
    Replies: 7
    Last Post: 02-21-2011, 02:04 AM
  4. Replies: 1
    Last Post: 08-02-2009, 11:52 AM
  5. Verifying existence of a table in a db
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-14-2008, 09:49 AM

Tags for this Thread

Posting Permissions

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