HOW TO INSTALL JDK KIT IN YOUR PC OR LAPTOP
- GO TO PC SETTING -> INFORMATION -> 1.TO KNOW IS WINDOW 32 BIT OR 64 BIT
- IF WINDOW IS 32 BIT THEN DOWNLOAD 32bit JDK KIT OR IF WINDOW IS 64 BIT THEN DOWNLOAD 64bit JDK KIT
- FOR INSTALLATION SEE FOLLOWING STEPS:-
- JUST DOUBLE CLICK ON DOWNLOADED FILE:-
2.AFTER THIS PROCESS CLICK ON NEXT
3 STEP:- CLICK ON CLOSE
4 STEP:- OPEN COMMAND PROMPT AND TYPE cd/ AND PRESS ENTER5.STEP:- TYPE javac
if its not install successfully then this type of error will come in your cmd you can see this image
FOR THIS PROBLEM TO SOLVE REQUIRE TO GIVE PATH TO YOUR ENVIRONMENT VARIABLE
FOR TEMPORALLY SOLUTION
- YOU CAN ALSO SET PATH IN CMD BUT IS DONE TEMPORARY AND WHEN YOU NEED TO RUN PROGRAM YOU NEED TO SET PATH ALWAYS
- C:\>set path="C:\Program Files\Java\jdk1.8.0_101\"
- FOR TAKE THIS PATH GO TO C: DRIVE ->PROGRAM FILES ->JAVA ->JDK 1.8.0_101 ->bin
- THIS TIME I USE JDK 1.8.0_101 THIS VERSION YOU MAY GET NEW VERSION OR OLD LIKE JDK 7 OR etc.
FOR PERMANENT SOLUTION
- JUST GO TO PRESS WINDOW KEY -> EDIT THE SYSTEM ENVIRONMENT VARIABLE ->
- THIS TYPE OF POPUP MENU WILL OPEN
- CLICK ON ABOVE BOX ->USE VARIABLES FOR (YOUR PC NAME) ->CLICK ON NEW BUTTON->
- WRITE VARIABLE NAME:- PATH
- VARIABLE VALUE:- PASTE HERE (C:\Program Files\Java\jdk1.8.0_101\bin)
OPEN BELOW DIALOGUE BOX CLICK NEW
- VARIABLE NAME:-CLASSPATH
- VARIABLE VALUE:- AGAIN PASTE HERE SAME PATH:-
- (C:\Program Files\Java\jdk1.8.0_101\bin)
- then type (;%PATH%;)
- GO TO ->
- C: DRIVE ->PROGRAM FILES ->JAVA ->jre 1.8.0_101 ->bin
- COPY THE PATH OF BIN:-C:\Program Files\Java\jre1.8.0_101\bin
- type variable value:-
- C:\Program Files\Java\jdk1.8.0_101\bin;%PATH%;C:\Program Files\Java\jre1.8.0_101\bin
- THIS PATH IS RUN EVERY WHERE IN ANY FOLDER
- FOR PARTICULAR FOLDER PATH IF I WANT TO SET THEN
- GIVE VARIABLE VALUE :-
- C:\Program Files\Java\jdk1.8.0_101\bin;%PATH%;F:\javaRV
- WHERE MY FOLDER PATH IS:- F:\javaRV
/FOR STORE JAVA PROGRAM MAKE FOLDER
I HAVE MAKE FOLDER IN MY F: DRIVE AND FOLDER NAME IS javaRV
CREATE PROGRAM
- .ALREADY WRITTEN PROGRAM IN NOTEPAD FIRST
as you can see give as
AFTER TYPE PROGRAM SAVE THIS WITH WHAT YOU GIVE CLASS NAME IN
THIS FOLDER WHERE YOU HAS SET PATH
FILENAME:-"Test.java"
SAVE AS TYPE:- ALL FILES
SAVE THIS.
IF YOU HAVE NOTEPAD++ , YOU CAN TYPE ON NOTEPAD++
FIRST CREATE PROGRAM
YOU CAN SEE OUTPUT HERE
FOR RUN THE PROGRAM FIRST OPEN CMD ->AND TYPE THE DRIVE WHERE IS FOLDER. I HAVE CREATE FOLDER IN F: DRIVE THEN I TYPE AS YOU CAN SEE
FOR GO TO THE DIRECTORY TYPE f:> cd <foldername>
for compie your program type javac Test.java
f:>javaRV>javac Test.java
if doesn't have error then as you see in image
type
f:>javaRV>java Test
I hope you understand this tricks very well and next trick will be coming soon!!!!!!
Comments