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
Where will it be used?
What is function and method in java?
When should I use singleton pattern?
Can we define a package statement after the import statement in java?
When we should use serialization?
What invokes a thread's run() method in java programming?
What one should take care of, while serializing the object?
What is the difference between logical data independence and physical data independence?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
How do you declare an empty string?
Can we declare a class as abstract without having any abstract method?
Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example
How many wrapper classes are there in java?
How do I remove a character from a string in java?
Describe the Big-O Notation.