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
What is java abstraction with example?
What is return in java?
What is charat java?
What is private protected in java?
Is void a return type?
Why are the destructors for base class and derived class called in reverse order when the program exits
How does singleton class work?
What are the Main functions of Java?
What does file separator do in java?
Which is easier netbeans or eclipse?
What is the basic concept of java?
What is regex in java?
Why do we need autoboxing in java?
What are different exception types exceptions available in java ?
Can main() method in java can return any data?