<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Md. Rakibul Hasan</title>
    <description>The latest articles on DEV Community by Md. Rakibul Hasan (@rakibhasan455).</description>
    <link>https://dev.to/rakibhasan455</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F446726%2F0e855cdc-6ad7-42a6-ac1d-e655720674d4.jpg</url>
      <title>DEV Community: Md. Rakibul Hasan</title>
      <link>https://dev.to/rakibhasan455</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rakibhasan455"/>
    <language>en</language>
    <item>
      <title>What to do if Java command is not recognized by terminal.</title>
      <dc:creator>Md. Rakibul Hasan</dc:creator>
      <pubDate>Wed, 05 Aug 2020 10:13:44 +0000</pubDate>
      <link>https://dev.to/rakibhasan455/what-to-do-if-java-command-is-not-recognized-by-terminal-o4c</link>
      <guid>https://dev.to/rakibhasan455/what-to-do-if-java-command-is-not-recognized-by-terminal-o4c</guid>
      <description>&lt;p&gt;Now a days we install java in our windows for our own work.But it's quite annoying while it's not recognized by the terminal.Sometimes we even run java file from terminal so it needs to be fixed.&lt;br&gt;
So here is the thing that you can do.&lt;br&gt;
Step 1:&lt;br&gt;
First of all right click on this pc.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy1uiop7yxjjvc2rix0i1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy1uiop7yxjjvc2rix0i1.PNG" alt="Alt Text" width="394" height="318"&gt;&lt;/a&gt;&lt;br&gt;
Step 2:&lt;br&gt;
Go to properties and click advanced system settings.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbljaibr5fhtuiz75mbc6.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbljaibr5fhtuiz75mbc6.PNG" alt="Alt Text" width="791" height="597"&gt;&lt;/a&gt;&lt;br&gt;
Step 3:&lt;br&gt;
Now click on environment variables.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foqhyj99kq9uvmxe63m8i.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foqhyj99kq9uvmxe63m8i.PNG" alt="Alt Text" width="784" height="602"&gt;&lt;/a&gt;&lt;br&gt;
Step 4:&lt;br&gt;
Now look at user variables. Look if there is any path variable. &lt;br&gt;
If there is path variable then look at &lt;b&gt;Method 1&lt;/b&gt;..&lt;br&gt;
If there is no path variable then look at &lt;b&gt;Method 2&lt;/b&gt;..&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdfhxfjp3qao1t2d18spi.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdfhxfjp3qao1t2d18spi.PNG" alt="Alt Text" width="621" height="587"&gt;&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Method 1:&lt;/b&gt;&lt;br&gt;
in your case if there is path variable.You have to select path variable and click edit.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqm9zegbw59rnl9rkoun4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqm9zegbw59rnl9rkoun4.PNG" alt="Alt Text" width="620" height="584"&gt;&lt;/a&gt;&lt;br&gt;
Now click on new . And paste the location of your java bin folder.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" alt="Alt Text" width="800" height="602"&gt;&lt;/a&gt;&lt;br&gt;
Click and copy the location.In my case it's location is:&lt;br&gt;
C:\Program Files\Java\jdk-14.0.1\bin&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4ka3sjgll6o97yjmq0c0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4ka3sjgll6o97yjmq0c0.PNG" alt="Alt Text" width="523" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click on ok .Then open the terminal.&lt;br&gt;
write--&amp;gt; "Java -version".&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" alt="Alt Text" width="680" height="295"&gt;&lt;/a&gt;&lt;br&gt;
it should show your java version. &lt;br&gt;
If it's not then reinstall java by downloading java executable file from &lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;https://www.oracle.com/java/technologies/javase-downloads.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Method 2&lt;/b&gt;&lt;br&gt;
If there is no path variable then click on new.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5vkiybxtqv5kzqb27gaf.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5vkiybxtqv5kzqb27gaf.PNG" alt="Alt Text" width="617" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;write the variable name as "path" And paste the location of your java bin folder in variable value box.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" alt="Alt Text" width="800" height="602"&gt;&lt;/a&gt;&lt;br&gt;
Click and copy the location.In my case it's location is:&lt;br&gt;
"C:\Program Files\Java\jdk-14.0.1\bin"&lt;/p&gt;

&lt;p&gt;So i have wrote the variable name as "path" and pasted "C:\Program Files\Java\jdk-14.0.1\bin"&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frdd3hnvk3e8nwqol1mo0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frdd3hnvk3e8nwqol1mo0.PNG" alt="Alt Text" width="652" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click on ok .Then open the terminal.&lt;br&gt;
write--&amp;gt; "Java -version".&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" alt="Alt Text" width="680" height="295"&gt;&lt;/a&gt;&lt;br&gt;
it should show your java version. &lt;br&gt;
If it's not then reinstall java by downloading java executable file from &lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;https://www.oracle.com/java/technologies/javase-downloads.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope it will help you. Thanks !&lt;/p&gt;

</description>
      <category>java</category>
      <category>compiler</category>
    </item>
  </channel>
</rss>
