- To see if JDK is installed, type 'java' in command prompt and enter.
- Use 'javac' command to see if the path is set.
It will display like above if the path is set. Otherwise it will say something like:
In that sort f a situation you need to set the path. Setting path means you are locating the java compiler to compile java programs.
- Setting the Path
In cmd type the path for the bin
folder of jdk you installed as below:
► It is highly recommended to use the tab key to generate the path than type it manually to avoid spelling mistakes.
► Make sure you do not keep spaces before or after the '=' sign
► Try 'javac' command again to confirm that you set the path correctly.
► A path may exist only for that particular command prompt. Once you open a new cmd you will have to set the path again.
► To avoid setting the java path again and again you can create an environment variable for the path. (Will explain later..)
No comments:
Post a Comment