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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we have multiple catch block for a try block?

1019


how can i use a nonsynchronized hashtable?

2571


Why string is not a wrapper class?

1183


Explain method overloading?

1019


Why we do exception handling in java and how many types of exceptions are there?

1127


How do you define a set in java?

1017


How can you add and remove nodes in jtree?

1044


Explain about strings in java?

1072


What does || mean in code?

1039


Is java free for commercial?

922


Is java an ide?

981


What are basic data types?

1095


Is integer passed by reference in java?

1011


What is data structure in java?

990


What is an object's lock and which object's have locks in java programming?

1048