-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.2_12, 5.0u7
-
x86
-
windows_vista
PROBLEM:
os.name returns "Windows NT (unknown)" on Windows Vista
IMPACT:
Deployment/Deployment, Deployment/Plugin tests etc which rely on os.name cannot run as results directory will be created as the following format:
$USER_NAME.Windows_NT_(unknown).x86
REPRODUCIBLE TESTCASE:
I used the following testcase:
import java.lang.*;
class Test
{
public static void main(String args[])
{
System.out.println ("os.name = " + System.getProperty("os.name"));
System.out.println ("os.arch = " + System.getProperty("os.arch"));
System.out.println ("os.version = " + System.getProperty("os.version"));
}
}
OUTPUT:
Compiled the file on windows-vista as follows:
c:/j2sdk1.4.2_12/bin/javac Test.java
Ran it with following output:
c:/j2sdk1.4.2_12/bin/java Test
os.name = Windows NT (unknown)
os.arch = x86
os.version = 6.0
If I compile the file and run on windows-vista with mustang:
c:/jdk1.6.0/bin/javac Test
c:/jdk1.6.0/bin/java Test
os.name = Windows Vista
os.arch = x86
os.version = 6.0
NOTES:
Windows Vista (TM) Beta 2 - Build 5308.
os.name returns "Windows NT (unknown)" on Windows Vista
IMPACT:
Deployment/Deployment, Deployment/Plugin tests etc which rely on os.name cannot run as results directory will be created as the following format:
$USER_NAME.Windows_NT_(unknown).x86
REPRODUCIBLE TESTCASE:
I used the following testcase:
import java.lang.*;
class Test
{
public static void main(String args[])
{
System.out.println ("os.name = " + System.getProperty("os.name"));
System.out.println ("os.arch = " + System.getProperty("os.arch"));
System.out.println ("os.version = " + System.getProperty("os.version"));
}
}
OUTPUT:
Compiled the file on windows-vista as follows:
c:/j2sdk1.4.2_12/bin/javac Test.java
Ran it with following output:
c:/j2sdk1.4.2_12/bin/java Test
os.name = Windows NT (unknown)
os.arch = x86
os.version = 6.0
If I compile the file and run on windows-vista with mustang:
c:/jdk1.6.0/bin/javac Test
c:/jdk1.6.0/bin/java Test
os.name = Windows Vista
os.arch = x86
os.version = 6.0
NOTES:
Windows Vista (TM) Beta 2 - Build 5308.
- duplicates
-
JDK-6220825 System property os.name should be "Windows Vista" on Windows Vista
-
- Resolved
-