Download Tutorial: Install and configure JDK (Java Development Kit) Step 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Tutorial: Install and configure JDK (Java Development Kit)
Step 1:- Download latest version of JDK from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
If you have 32-bit
operating system
then download
this version.
Step 2:- Your JDK setup file is successfully downloaded.
Run JDK setup file, a window will prompt. Hit next to start installation…
Hit continue to complete installation.
Installation setup may prompt you to install JavaFx. JavaFx is a tool to desigh rich GUI (Graphical User
Interface). If you want to use it then continue installation otherwise hit cancel. We will use NetBeans for
GUI designing in latter lectures.
Step 3:- Confirm JDK is installed sucessfully by varifying JDK folder is available in Program Files.
javac is the file that you need to compile Java class files with the help of command prompt.
Now go to start menu -> run and execute cmd (command prompt).
Go to bin directory (folder) of JDK.
Change Directory
Go to root of current directory hierarchy.
Run javac
This output shows java is working correctly.
Close command prompt and run again. It will run with different path of directory. Like given below
screen shot. Now if you will run javac it will show the error given in the screen shot.
If you want to compile any java class file then you have to follow the procedure (Go to bin directory
under installation folder of JDK. Type javac and give complete path of the java class file. )
It is difficult to compile java class files in this way. The solution is set the path of bin directory.
Step 4:- Go to control panel and run System.
Alternate method is right click My Computer and hit properties.
A new window will prompt. Select advance tab and hit environment variables.
Another window will prompt.
Select
Hit
Another window will prompt.
Copy the path of bin directory under JDK installation directory.
Paste copied path at end of variable value field. Remember prefix ; sign before pasting the copied path.
Now open command prompt again and run javac. You will notice now you are able to run java compiler
from any directory. You don’t need to go in bin directory for running java compiler.