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

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
17 replies · 6K views
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:
Physics news on Phys.org
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
 
i am having the same issue here but can not find javac.exe...

what do i do know?!
 
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.
 
Are you using Windows 7 also math34?
 
math34 said:
yes i believe so
Then it will be in the /bin directory where you installed it.
 
HeLiXe said:
Are you using Windows 7 also math34?

yea I am using windows 7 here
 
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!
 
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.