in our lab's linux machines, there is a uadmin user, who has the same uid with root. But they don't have same user home dir.(root's home dir is /root, uadmin's home dir is /home/uadmin)
when executing the following program
public class GetPropertyTest extends Applet {
public static void main(String[] args) {
System.out.println("Value of " + args[0] + " is " + System.getProperty(args[0]));
}
}
by java GetPropertyTest user.home, it prints "/root" not "/home/uadmin".
command like "cd ~" will go to /home/uadmin.
Tested with 7u4 b20
when executing the following program
public class GetPropertyTest extends Applet {
public static void main(String[] args) {
System.out.println("Value of " + args[0] + " is " + System.getProperty(args[0]));
}
}
by java GetPropertyTest user.home, it prints "/root" not "/home/uadmin".
command like "cd ~" will go to /home/uadmin.
Tested with 7u4 b20
- relates to
-
JDK-7069190 user.home property should be configurable via the HOME variable
- Open