H
harryos
hi
i have installed java to E:\Java\jdk1.6.0_05 on my WinXP machine and
it has jre on E:\Java\jre1.6.0_05 .
There is also a jre folder at E:\Java\jdk1.6.0_05\jre
I have set Env variable on my system as JAVA_HOME=E:\Java\jdk1.6.0_05
so at the cmd prompt ,when i try
echo %JAVA_HOME% i get
E:\Java\jdk1.6.0_05
Now i wrote some code like below to get System properties
Properties props=System.getProperties();
Set<String> pairs=props.stringPropertyNames();
Iterator<String> it=pairs.iterator();
while(it.hasNext()){
String key=it.next();
System.out.print(key+"=");
String val=props.getProperty(key);
System.out.println(val);
}
when i run this from the cmd prompt i get an output where
java.home=E:\Java\jre1.6.0_05
Then i tried the same code inside a jsp script in a web application
using NetBeansIDE ,there i get
java.home=E:\Java\jdk1.6.0_05\jre
i am confused by these 3 different values.Should i not get java.home
as what i set for JAVA_HOME in the env variables?
thanks
harry
i have installed java to E:\Java\jdk1.6.0_05 on my WinXP machine and
it has jre on E:\Java\jre1.6.0_05 .
There is also a jre folder at E:\Java\jdk1.6.0_05\jre
I have set Env variable on my system as JAVA_HOME=E:\Java\jdk1.6.0_05
so at the cmd prompt ,when i try
echo %JAVA_HOME% i get
E:\Java\jdk1.6.0_05
Now i wrote some code like below to get System properties
Properties props=System.getProperties();
Set<String> pairs=props.stringPropertyNames();
Iterator<String> it=pairs.iterator();
while(it.hasNext()){
String key=it.next();
System.out.print(key+"=");
String val=props.getProperty(key);
System.out.println(val);
}
when i run this from the cmd prompt i get an output where
java.home=E:\Java\jre1.6.0_05
Then i tried the same code inside a jsp script in a web application
using NetBeansIDE ,there i get
java.home=E:\Java\jdk1.6.0_05\jre
i am confused by these 3 different values.Should i not get java.home
as what i set for JAVA_HOME in the env variables?
thanks
harry