How Do I Set Up Java on Windows 7 If the Instructions Are for XP or Vista?

Click For Summary

Discussion Overview

The discussion revolves around setting up Java on Windows 7, particularly addressing the challenges faced when following instructions meant for earlier versions like Windows XP or Vista. Participants explore the installation of the Java Development Kit (JDK) and the configuration of environment variables necessary for the Java compiler (javac) to be recognized in the command prompt.

Discussion Character

  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant seeks guidance on adapting installation instructions from Windows XP/Vista to Windows 7.
  • Another participant notes that the Java compiler (javac) does not come with the standard Java Runtime Environment (JRE) and emphasizes the need to download the JDK.
  • Several participants discuss the importance of correctly setting the PATH variable to include the directory where javac is located.
  • Some participants express uncertainty about the location of javac and suggest checking the installation directory for the JDK.
  • There are repeated inquiries about whether the JDK has been installed correctly and whether javac can be found in the expected directory.
  • A participant mentions the need to add the JDK's bin directory to the system PATH variable for javac to be recognized.

Areas of Agreement / Disagreement

Participants generally agree on the necessity of installing the JDK to access javac, but there is no consensus on the specific steps or configurations required, as some participants encounter different issues related to their installations.

Contextual Notes

Some participants reference specific paths and installation directories, but there is uncertainty regarding the exact steps for setting environment variables in Windows 7 compared to earlier versions.

Who May Find This Useful

Individuals setting up Java on Windows 7, particularly those transitioning from older versions of Windows or new to programming.

UltimateSomni
Messages
62
Reaction score
0
I bought a book for beginners and it said "On Windows Vista or Window XP, navigate through Start, Control Panel, System, Advanced (System Settings), Environment Variables. Select the System Variable named "Path" and then click the Edit button. Add the address of Java;'s bin sub directory at the end of the list in the Variable Value field. For instance add C:\Java\bin; then click the OK button"

I don't have XP or Vista, does anyone know what the 7 equivalent of what it is asking to do is?

Edit: nevermind, I did all that but when I do the "java -version" thing or "javac -version" it says that it is not recognized as an internal or external command

Well, java is now recognized but not javac
 
Last edited:
Technology news on Phys.org
Last edited by a moderator:
Borg said:
A dumb question but, I've learned to ask anyway - is javac in your C:\Program Files\Java\jre\bin directory? That looks like the typical original jre (Java Runtime Environment) that doesn't have javac.

I don't know where my javac is, if I type javac into the run thing I get an error.

Here is what I downloaded: http://i54.tinypic.com/v4cf44.jpg

As you can see, I since downloaded Netbeans, but the location it gave me C:\Program Files\Java\jdk1.6.0_25 leads to the cmd prompt not even recognizing java.
 
UltimateSomni said:
I don't know where my javac is, if I type javac into the run thing I get an error.

Here is what I downloaded: http://i54.tinypic.com/v4cf44.jpg

As you can see, I since downloaded Netbeans, but the location it gave me C:\Program Files\Java\jdk1.6.0_25 leads to the cmd prompt not even recognizing java.

Time to learn how to use the file manager, I suspect. Have you tried looking around in C:\Program Files\Java to see if you can find javac.exe? Wherever it is, that's what goes in your path.

I would take a guess that maybe it's in C:\Program Files\Java\jdk1.6.0_25\bin, but break out that file manager and find it. There's also a search function in there somewhere, I'm pretty sure. I'd be more specific about where to find the search feature in the file manager (aka File Explorer or something like that), but I don't have a Windows system around to check things.
 
Grep said:
Time to learn how to use the file manager, I suspect. Have you tried looking around in C:\Program Files\Java to see if you can find javac.exe? Wherever it is, that's what goes in your path.
What he said. :wink:
Grep said:
I would take a guess that maybe it's in C:\Program Files\Java\jdk1.6.0_25\bin, but break out that file manager and find it. There's also a search function in there somewhere, I'm pretty sure. I'd be more specific about where to find the search feature in the file manager (aka File Explorer or something like that), but I don't have a Windows system around to check things.
The path variable tells your system what directories to look in for programs, dlls, etc. If you can't find the program in those directories, Windows isn't going to find it either.

The search function in Windows can be found by selecting a directory from the file manager and right clicking on it.
 
Grep said:
Time to learn how to use the file manager, I suspect. Have you tried looking around in C:\Program Files\Java to see if you can find javac.exe? Wherever it is, that's what goes in your path.

I would take a guess that maybe it's in C:\Program Files\Java\jdk1.6.0_25\bin, but break out that file manager and find it. There's also a search function in there somewhere, I'm pretty sure. I'd be more specific about where to find the search feature in the file manager (aka File Explorer or something like that), but I don't have a Windows system around to check things.

Got it, it is C:\Program Files\Java\jdk1.6.0_25\bin
 
  • #10
Is it working now?
 
  • #11
i am having the same issue here but can not find javac.exe...

what do i do know?!
 
  • #12
math34 said:
i am having the same issue here but can not find javac.exe...

what do i do know?!
Did you download the JDK (Java Development Kit) version?

There are two types of java installation - One for general use that doesn't have the javac compiler and the version for developers that does have it. If you didn't personally download the JDK, then you won't have javac on your computer.
 
  • #13
yes i believe so
 
  • #14
Are you using Windows 7 also math34?
 
  • #15
math34 said:
yes i believe so
Then it will be in the /bin directory where you installed it.
 
  • #16
HeLiXe said:
Are you using Windows 7 also math34?

yea I am using windows 7 here
 
  • #17
ok so i went under C:\Java\bin

i see javac in this bin folder

excuse me, i have little to no experience with programming here...what is the next step to fix this issue?

Thanks!
 
  • #18
The simpliest way would be to put it in your computer's system path. I don't have Windows 7 so I'll do my best to get you to what you need. I'm listing how to do it from XP but, I think that it is the same as long as you can find the Control Panel.

Open your Control Panel and open the System link.

Go to the Advanced Tab and select Environment Variables.

The Environment Variables window will have two sections - one for the current user and one for the system. Try to add the C:\Java\bin directory to the end of the Path variable for the current user or the System (if you want it set for everyone). Be sure to use a semicolon (;) to separate the new path from the others.

Close the properties windows and it should work when you try to use the javac command to compile. If not, you may need to restart the compter for it to take effect. You can check by opening a dos window and type the word 'set' at the command prompt. That will display your current path variables along with other information.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
2
Views
6K
  • · Replies 13 ·
Replies
13
Views
7K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 27 ·
Replies
27
Views
24K
  • · Replies 1 ·
Replies
1
Views
8K
  • · Replies 4 ·
Replies
4
Views
4K