• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble installing Java

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm fairly new to programming, and i've been reading JavaRanch's page on how to install Java (here). I have successfully downloaded "jdk1.7.0_21". I think something is wrong with the path settings, I am using Windows 7 and have gone to advanced system settings and added a system variable "JAVA_HOME" with value "C:\Program Files (x86)\Java\jdk1.7.0_21" and edited the "Path" variable as it tells me to. Then it tells me to open a command prompt and type in "javac-version" to get the version of the SDK, but I get the error: "'javac-version' is not recognised as an internal or external command, operable program or batch file."

Anyone have any idea's what i'm doing wrong?

Any help would be appreciated
 
Ranch Hand
Posts: 419
Mac jQuery Objective C
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope you added space between javac and -version. Otherwise just try Javac. Also try to print echo %path% and echo %classpath% see if its correct. I hope you added full path till bin folder in your Path varibale
 
Ranch Hand
Posts: 1164
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add the location of your /Java/jdk1.7/bin and /Java/jdk1.7/lib also to your path variable. All the binaries are located in the bin folder. Try this and get back.

And a warm welcome to the ranch.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mansukhdeep Thind wrote:Add the location of your /Java/jdk1.7/bin and /Java/jdk1.7/lib also to your path variable. . . .

No, no, no, no, no. Only add the bin folder.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1164
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So many "No" s Campbell. Did I say something drastically wrong or irrelevant?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1164
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is my mistake Ulf? Could you please correct me?
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mansukhdeep Thind wrote:What is my mistake Ulf? Could you please correct me?




Didn't Campbell do exactly that? And pretty emphatically too.

Henry
 
Mansukhdeep Thind
Ranch Hand
Posts: 1164
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is adding the lib folder irrelevant in this context or is it counterproductive?
 
Ranch Hand
Posts: 50
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bin contains all the binary files like java, javac, and jar which are used by jdk during program compilation and execution.
lib contains all the library functions like API and all packages that are used by either jdk or user. These are the implicit functions or classes that need not be defined before using.
reply
    Bookmark Topic Watch Topic
  • New Topic