Java/J2EE and SOA (325 Blogs) Become a Certified Professional
AWS Global Infrastructure

Programming & Frameworks

Topics Covered
  • C Programming and Data Structures (41 Blogs)
  • Comprehensive Java Course (2 Blogs)
  • Java/J2EE and SOA (324 Blogs)
  • Spring Framework (8 Blogs)
SEE MORE

MI-new-launch

myMock Interview Service for Real Tech Jobs

myMock-widget-banner-bg

How To Set Path in Java?

Last updated on Nov 27,2019 2.9K Views
1 / 4 Blog from Environment Setup

MI-new-launch

myMock Interview Service for Real Tech Jobs

myMock-mobile-banner-bg

myMock Interview Service for Real Tech Jobs

  • Mock interview in latest tech domains i.e JAVA, AI, DEVOPS,etc
  • Get interviewed by leading tech experts
  • Real time assessment report and video recording

Java is one of the most prominent programming languages that has conquered the IT world. To keep up with the growing industry, it is important to learn Java and the first step for obvious reasons is installing Java. After the installation, if you want to work with java without any hiccups one would need to set the java path. Following are the contents discussed in this blog: 

Why Do You Set A Java Path?

The path is the most important environment variable of the Java environment which is used to locate the JDK packages that are used to convert the java source code into the machine-readable binary format.

Tools like javac and java can be used by setting the path. When you save your file in the java directory i.e where java is installed, it is not necessary to set a path. But if you are saving your file outside the directory, it is fairly necessary to set the path beforehand.

How To Set Java Path?

There are two methods to set the path.

  1. Temporary path
  2. Permanent path

Temporary path of JDK

It is very easy to set the temporary path of JDK. Follow the following steps to set the path.

  1. Open the terminal or command prompt
  2. Go to the path where the JDK/bin directory has been saved
  3. Copy the path
  4. Enter the following command in the command prompt

temporary path-how to set java path-edureka

This will set the temporary path of JDK.

Permanent Path of JDK

To set the permanent path of the JDK on your system, follow the steps below.

  • Open System settings and go to advanced system settings.

permanent path-how to set java path-edureka

  • Click on the environment variables in the tab.

permanent path-how to set java path-edureka

  • Go to user variables and click on new.

permanent path-how to set java path-edureka

  • Add the variable name as ‘path’.
  • Copy the path of the JDK bin directory.

permanent path-how to set java path-edureka

  • Click ok.

Congratulations, you have successfully added a Java path.

Now that you have created a java path, you must master all the fundamental concepts in Java and start working on the skills to become a java developer. It takes a lot of practice and guidance to master advance java development because of its vast concepts. To kick-start your learning you can enroll to Edureka’s Java certification program which will help you in mastering all the skills and concepts to become a java developer.

Got a question for us? please mention this in the comments section of this ‘how to set path in java’ article and we will get back to you as soon as possible.

Comments
0 Comments

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.