-by Travis
- Go to google.com
- Search “Java JDK”
- Most likely click the first link (which should be a download page: here is the current site: http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- There should be four options to download (Java Platform JDK, JDK + JavaFX Bundle, JDK+ Java Beans, and JDK+ Java EE Bundle) any of those options are fine to download, to follow along with this tutorial, just download the Java Platform JDK.
- Install just like any other program, with all the default settings (Click next a bunch of times, read Term&Conditions, etc.)
- Click the Start Button (yes this is tutorial for Windows) and go to My Computer
- Click on the main harddrive (for most it is C:)
- Click on the Program Files folder> Open up the folder called Java
- Click on the version of Java you downloaded (something like jdk1.6.0_12)
- Open the bin folder
- Inside the bin Folder look for the File called javac, and right-click on it and go to Properties
- A new window should pop up giving the properties of the javac, there should be an attribute called Location. Find the and copy the path (example: “C:\Program Files\Java\jdk1.6.0_ 12\bin”
- Now we have the Path Location, so Click the start button again and right-click on the “Computer” and open up the “Properties”.
- In the left side bar look for “Advanced system settings” and open that up (Click Continue)
- Towards the bottom of the popup, Click “Environment Variables…”
- Set up a new User variable by clicking the top most “New..” button (under the “User variables for xxxxx”)
- for the Variable name, type: Path
- and for the Variable value, paste your Location of the javac, for example: C:\Program Files\Java\jdk1.6.0_ 12\bin
- Click OK on all three popups and close your System settings panel as well.
- open up the command prompt again (Click start and type “cmd” in the search, press enter)
- Type “javac” in the command prompt and your problems should be solved
Hope that helps, and look forward to developing some applications/games with you guys.
Peace,
-Trav
span>
Hello I didn´t really get why this should be done? Can anyone replay
thx
Hey John,
Please go through the each step once again. Its illustrated in a very easy way. ( Its for Windows users)
Further still if you don’t find any stuff post your comment. Anyone’d help you out I’m pretty sure.
Peace.
Thanks, this tutorial helped me a lot, installing JDK in my pc..
I had to reboot after create de variable in order to work.
Thank you very much! It’s working perfectly now!
A tip; when the ‘javac’ command doesn’t work in the end, you can try to restart the CMD. It worked for me.
Thanks, Trav – worked like a charm, and I can honestly say this could have taken me days to find on my own.
And Thijs – thanks for the tip. Definitely worked like that for me. Interestingly, “java” worked right away, but “javac” didn’t work until I restarted the cmd prompt.
Cheers!
i typed “javac” in the cmd and it said not recognized, even after restarting computer. typing “java” got me some info. what should i do?
Thans
I was only able to find Javacpl and Javaw. Are either of these close to Javac?
Thanks
I had the same problem. Then I noticed I was finding the file javac in a wrong folder. I was in the “jre7″ folder where are the files Javacpl and Javaw, you mentioned, but you have to go to the “jdk1.7.0″ folder, where you definitely find file “javac”.
Make sure you are in the right folder, Program Files or Program files(x86) you will have Java in both bud depending on which version of sdk you downloaded determines where javac is.
Hi First of all thanks alot for the tuts
i have just started with this, and i would like to know
what will be the name of Environment Variable???
will it be javac?
if yes then i tried with same also restarted my PC but its not working…
looking forward to quick reply..
thanks in adv
Can you tell us how to set this up in windows 7?
if you downloaded the x86 version over the x64, follow the directions but look in program files(x86) for javac
Hey, I use MAC OSX Lion, I have last Xcode 4 version from App Store, and I want programing java with it but I don’t know what. I don’t have crate java project. Thanks and sorry for my english i’m spanish but I’m working to improve my english hehehe. bye.
I have the same problem as Brian, after installing JDK, there is only a program files/java/jre/bin folder, and it does not contain a javac.exe. What is the next step in this case?
Hey there,
Re check again! javac file will be found in the folder “C:\Program Files\Java\jdk1.7.0_02\bin”
You need to search in the folder ‘bin’. ( type j once u reach this folder ). Right click that file and copy its location that’ll be useful little later.
Further still if you don’t find any stuff post, your comment. Anyone’d help you out I’m pretty much sure.
Peace.
Re. my last comment, I have fixed the problem by unistalling a previously installed version of the JDK (1.6), restarting, then installing 1.7. Also, the javac.exe file is under the program files (x86) folder if you’re running a 64 bit version of Windows.
javac is also present there. look carefully. there are few files with similarity in names. u might be cofused
Hello, i do everything and when i type on the command “javac” open a black window (like the command pront) and then the window desappear!! What is wrong??? Thanks!
From Costa Rica!!
on the download page there is no download for 32bit, only 64, what do i do?
Hey there,
At the eclipse website you must get the download option for 32-bit computer. Have a deeper look again.
Peace.
thankyou very nice work man
I rlaley needed to find this info, thank God!
yo
yo homie
Ya learn something new eevryady. It’s true I guess!
I followed all of these instructions but for some reason in eclipse after I did the import shown in your java tutorial I still don’t have some of the jar file like the classes jar. Any help is greatly appreciated.
Thanks
hi travis
thank you
this collection is graat!
thnx buddy
Thanx a lot for this tutorial, and also for videos in youtube.
Thanks man it worked.
thanks for the tutorial ….
Guys if the cmd can’t find the command javac then go back into “environment variables” and make sure that you put the \bin at the end. When you copy and paste the location it does not have the \bin to it.
oh thank you very much mybringback.com,, you helped me a lot.. although i starting creating now our thesis program which is a mobile application you helped me in installing jdk and other resources that i will need to develop our mobile application.. nevertheless can i ask you something?? it is possible that i can use either mysql or sqlLite as for database in java programming?? if yes how? please help me.. tnx..
other simple way to perform…follow the steps.
1. open c drive
2. open program folder
3. open java folder
4. open jdk folder….(“jdk1.7.0_05″ something like that)
5. right click on bin folder.
6. select command prompt
7. type – javac
8. enter
thanks….
Hi there,
I think its worth mentioning how to append more paths to the path variable. I already had a path set and didn’t want to mess with it. But after some reading I found that you can add more path values just by adding a semicolon. For example
PATH = C:\Program Files\myPath;C:\Program Files\myPath2;C:\Program Files\myPath3
This might be helpful for anyone who may already have a path variable set.
It is an exellent stuff and the tutorial is so clear and easy to fallow.
TNX DUDE, THIS ACTUALLY HELPED ME.
Hey man I like your tutorial on youTube keep it up:)
can I just know which jdk to download for windows xp?
win x86 oR win x64??
and ur tuts are awsmmm…
i installed java jdk properly and it shows in the command prompt as well but you see i didn’t install the Eclipse , i took it from my friend and i copied it to D: drive . So when i double click the Eclipse file they say something like this
failed to load the JNI shared library “C:\Program Files\Java\jdk1.7.0_10\bin..\jre\bin\server\jvm.dll”. Please help me on this
Hi everyone!
I have stuck in a problem. I have done all the steps correctly as they are illustrated. But when i started eclipse, a window popup and still showing
“A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:\eclipse\bin\javaw.exe
javaw.exe in your current PATH”
please help me out of this ASAP.
I uninstalled JDK and re-installed it. Now, i am facing the same problem as mirza’s. Resolve this problem ASAP please
Works perfectly for me, i just followed the instructions in this tutorial. Thanks, and let’s stard coding ! P)
works !!!! thank u….
one of the best tutorial i ever have been through..! Amazing…
THanks
Please assist me,
i have found the javac file in C:\Program Files (x86)\Java\jdk1.7.0_17\bin but when i navigate to the file and right click then select properties i get a box with tabs such as general, previous version, Details, Compatibillity etc at the top but cant seem to locate attribute called Location.
thanks in advance