• Post Reply Bookmark Topic Watch Topic
  • New Topic

FAQ Section Question  RSS feed

 
Franklin Marquette
Ranch Hand
Posts: 49
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What am I supposed to do here:

Open the command prompt, go to a directory different from your JDK install directory, and type "javac -version".

Also - does this seem like the correct value of the JAVA_HOME variable - "C:\Program Files\Java\jdk1.7.0_40"

THANKS!
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open the command prompt, go to a directory different from your JDK install directory, and type "javac -version".

Which part do you need help with?
And what OS are you using?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Franklin Marquette wrote:
Also - does this seem like the correct value of the JAVA_HOME variable - "C:\Program Files\Java\jdk1.7.0_40"


Well... that depends. Do you actually have a JDK installed in that location?

Henry
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have just installed JDK7 update 40 in the default location that is probably correct. But you ought to have installed the most recent version, update 45. Download it here, install it, noting carefully where you install it, and change that JAVA_HOME to end with 45.
 
Franklin Marquette
Ranch Hand
Posts: 49
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:
Open the command prompt, go to a directory different from your JDK install directory, and type "javac -version".

Which part do you need help with?
And what OS are you using?


Windows 7

I know how to open up the command prompt but what do they mean by saying "open up a directory other than your JDK directory AFTER opening up the command prompt"?
Then do I just type "javac - version in the command prompt?

Thanks


Yes it is installed in that location - I will get update 45 tomorrow - THANKS!
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Franklin Marquette wrote:I know how to open up the command prompt but what do they mean by saying "open up a directory other than your JDK directory AFTER opening up the command prompt"?
Then do I just type "javac - version in the command prompt?

Use the cd command in the Windows command prompt to navigate to a directory other than the JDK's bin directory. When you first open the command prompt, it's normally in your user directory, so you're already in another directory (and you don't need to do anything). Lookup a tutorial on basic command prompt commands, and concepts such as the "current directory".

Type: javac -version, not javac - version (note the extra space).
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I usually suggest is this:-
First time ever
mkdir java
cd java
That will create a directory of that name as a subdirectory of wherever your command prompt opens as a default, probably in MyDocuments.
On all subsequent occasions
cd java
This moves you to the java directory. You can give it a different name, or similarly create different subdirectories for different projects or stages of learning.
 
Franklin Marquette
Ranch Hand
Posts: 49
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay - will do - THANKS!
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!