• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Problems Installing Java SDK

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I've just gotten a new computer and am redownloading all of my required coding software. I've just downloaded the Java SE 8u102 download, and when I go to the command prompt to insure that things are working I receive an error:

C:\Users\reega>java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

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

I was under the assumption that these two items came bundled together? Javac is the compiler, correct? So if one is not working shouldn't they both be working? Sorry if this is a stupid question, tend to have more issues when installing software than I do with actual coding. Thanks for any help!
 
Rancher
Posts: 5014
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


The OS can not find the javac.exe file.  You can tell the OS where the javac.exe file is by adding the path to the bin folder where the file is located to the PATH environment variable .
Or you can give the OS the full path on the commandline:
C:\Program Files\Java\jdk1.8.0_60\bin\javac.exe -cp . -Xlint -Xdiags:verbose Fractions.java
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This wiki has all the information you need to setup your environment.
 
Reegan Cantrelle
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've tried following the path setup settings and it is giving me the same result; I tried that solution before posting (just tried it again for the sake of it). I can clearly see the javac.exe file in the bin folder..? Is there any other reason this wouldn't be working? It also can correctly access the java.exe file so I'm confused since they are in the same folder location.
 
Reegan Cantrelle
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
*sigh*. Never mind, I've figured it out. Apparently needed to close out command prompt for the change to take effect. Thanks for the help, it is much appreciated.
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that's gotten me too.  Glad you figured it out.
 
machines help you to do more, but experience less. Experience this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic