Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problems Installing Java SDK

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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!
 
Master Rancher
Posts: 3852
35
  • Mark post as helpful
  • send pies
  • 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: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's gotten me too.  Glad you figured it out.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic