Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the need to set path in java? how many ways to set
path in java? Explain breif?

Answers were Sorted based on User's Feedback



what is the need to set path in java? how many ways to set path in java? Explain breif?..

Answer / sadhi

We keep all "executable files"(like .exe files) and "batch
files"(like .bat) in path variable. And we keep all jar
files and class files in classpath variables.

So path is set according to the .exe files & .bat files And
classpath is set according to the .jar files & .class files.


Operating system tries to find .exe and .bat files in path
and JVM tries to find all classes in classpath.

set path is loading the environment variables with operating
system or javac.

setting the path in windows xp.
steps to set path for java:
1. go to ->my computer-> properties->advanced->
->environment variables.
2. in this window go to system variables and select -> new
3. now in variable write: classpath
4. write code as soon here in variable value:
;.;C:\Program Files\Java\jdk1.5.0\bin;
5. click ok and ok and ok

Is This Answer Correct ?    15 Yes 2 No

what is the need to set path in java? how many ways to set path in java? Explain breif?..

Answer / sivaiah

set the class means the jvm compile easly and execute

Is This Answer Correct ?    7 Yes 6 No

what is the need to set path in java? how many ways to set path in java? Explain breif?..

Answer / n.v.swami reddy

JAVA PATH IS COMPALASARY SET BECAUSE YOU NO SET THE PATH
JAVA PROGRAM IS DOES NOT EXECUTED.

JAVA PATH SET IN TWO WAYS THEY ARE
1.COMMAND PROMPT:
TYPE THE COMMAND
SET PATH=PATH%;d:/JAVA/BIN

d:/JAVA/BIN IS A JAVA PATH FOR SYATEM

2.TO SET JAVA PATH IN ENVIRONMENTAL VARIABLES.
1.RIGHT CLICK ON MY COMPUTER ICON SELECT
PROPERTIES.
2.SELECT THE ADVANCE TAB.CLICK ON ENVIRONMENTAL BUTTON.
3.THEN CHOOSE THE NEW OPTION
4.TPYE VARIABLE NAME AND VARIABLE VALUE
5.VARIABLE NAME IS PATH AND
VARIABLE VALUE IS"SET PATH=%PATH%"D:/JAVA/BIN

Is This Answer Correct ?    5 Yes 4 No

what is the need to set path in java? how many ways to set path in java? Explain breif?..

Answer / atre sachin

with the help of set path we sets the JRE executable path location

below are the ways to set the path in environment variable
JAVA_HOME ="/java"
CLASS_PATH="/java/bin/"
PATH ="/java"

Is This Answer Correct ?    5 Yes 5 No

what is the need to set path in java? how many ways to set path in java? Explain breif?..

Answer / abhinav bhargava

We can set the path for JAVA in the environment variables
like this:

After installing JAVA we will go to the environment
variables and add new path.

In the variable name write %classpath%
IN the value write the path where java is installed and ;.;

Now create a new key and in the variable write %path%
and in the value write path;.;

Is This Answer Correct ?    0 Yes 9 No

Post New Answer

More Core Java Interview Questions

What is sorting in java?

0 Answers  


Explain the difference between call by refrence and call by value?

0 Answers  


What are methods in java?

0 Answers  


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

0 Answers  


If a multi threaded Java program has started numerous number of threads, at any point in time how to know which thread is currently executing/running ?

7 Answers   Accenture, College School Exams Tests, iFlex, NIIT,


What are the different conditional statements?

0 Answers  


Is 0 an irrational number?

0 Answers  


How infinite loop is declared?

0 Answers  


What are static initalizers in java ?

0 Answers  


what do you mean by classloader in java?

0 Answers  


What is an example of a conditional statement?

0 Answers  


What is a stream? what are the different types and classes of Streams?

2 Answers  


Categories