Java - Interview Questions and Answers for 'Classpath' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Java Interview Questions


 2098 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Classpath' - 6 question(s) found - Order By Newest

 Q1. How to display and set the Class path in Unix ?
Anonymous
Ans. To display the current CLASSPATH variable, use these commands in UNIX (Bourne shell):

% echo $CLASSPATH

To delete the current contents of the CLASSPATH variable,

In UNIX: % unset CLASSPATH; export CLASSPATH

To set the CLASSPATH variable,

In UNIX: % CLASSPATH=/home/george/java/classes; export CLASSPATH

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     unix   unix commands   classpath


 Q2. What environment variables do I need to set on my machine in order to be able to run Java programs?
Admin
info@buggybread.com
Ans. CLASSPATH and PATH are the two variables.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   classpath   path   environment variables   jvm


 Q3. Difference between PATH and CLASSPATH ?Operating System
Admin
info@buggybread.com
Ans. PATH is the variable that holds the directories for the OS to look for executables. CLASSPATH is the variable that holds the directories for JVM to look for .class files ( Byte Code ).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   path   classpath   byte code   jvm   basic interview question     CapitalOne  MathWorks  eG Innovations      intermediate        rare


 Q4. What is classpath in a project?Core Java
Admin
info@buggybread.com
Ans. ClassPath is the path where Java looks for class files to resolve the dependencies. For example - If you are using a class "xyz" in your code and have specified the respective import, Where should Java look for the definition of xyz. Java determines using the class path settings.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   classpath   classpath settings     CapitalOne  MathWorks


 Q5. What is a classpath in Java ?Core Java2016-08-14 19:27:02

Ans. Classpath is the parameter for JVM to look for java classes ( .class files ) that are to be looad by class loader

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     classpath     CapitalOne      basic


 Q6. Which environment variables do we need to set in order to run Java programs?Core Java2017-01-12 10:55:08

Ans. PATH, CLASSPATH and JAVA_HOME

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     environment variables  path  classpath  java_home     QUADRATIC SYSTEMS  Computer sciences corporation (csc)  HCL Technologies      basic        frequent




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: