What is Classpath in java?

0 votes
Jun 5, 2018 in Java by Akrati
• 3,150 points
250 views

1 answer to this question.

0 votes

Classpath is a parameter in the Java virtual machine or the Java compiler that specifies the location of user-defined classes and packages. The parameter may be set either on the command-line, or through an environment variable.

o, classpaths contain:

  • JAR files, and
  • Paths to the top of package hierarchies.
How to set classpath for windows7:
  1. From the desktop, right click the Computer icon.
  2. Choose Properties from the context menu.
  3. Click the Advanced system settings link.
  4. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  5. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
answered Jun 5, 2018 by Daisy
• 8,040 points

Related Questions In Java

0 votes
1 answer

What is the difference between Set and List in java?

List is an ordered sequence of elements. ...READ MORE

answered Apr 26, 2018 in Java by Akrati
• 3,150 points
56 views
0 votes
1 answer

What is the use of @Override annotation in Java ? When do we use it ?

I think it is most useful as ...READ MORE

answered May 4, 2018 in Java by Akrati
• 3,150 points
66 views
0 votes
1 answer

What is the concept of Immutability for strings in Java ? Why are strings immutable ?

According to Effective Java, chapter 4, page 73, ...READ MORE

answered May 11, 2018 in Java by Rishabh
• 3,520 points
123 views
0 votes
1 answer

What is the 'instanceof' operator used for in Java?

It's an operator that returns true if ...READ MORE

answered May 23, 2018 in Java by Rishabh
• 3,520 points
49 views
0 votes
2 answers

Java Environment Variables

--- To set java path --- There are ...READ MORE

answered Dec 3, 2018 in Java by Sushmita
• 6,840 points
63 views
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,380 points

edited Nov 6, 2018 by Omkar 5,993 views
0 votes
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,050 points
1,580 views
0 votes
1 answer

Where is Hadoop Classpath?

It is set in hadoop-config.sh. You can add ...READ MORE

answered Apr 2, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
792 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,190 points
191 views
0 votes
2 answers

What is the use of toString method in Java and how can I use it ?

Whenever you require to explore the constructor ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,040 points
286 views