1、获取操作系统类型
if (System.getProperty("os.name", "UNKNOWN_OS").indexOf("Windows") != -1)
{
strRootPath = "C:";
}
xp系统:System.getProperty("os.name", "UNKNOWN_OS") 返回Windows XP
2、获取系统路径符
File.separator
XP系统:/
1、获取操作系统类型
if (System.getProperty("os.name", "UNKNOWN_OS").indexOf("Windows") != -1)
{
strRootPath = "C:";
}
xp系统:System.getProperty("os.name", "UNKNOWN_OS") 返回Windows XP
2、获取系统路径符
File.separator
XP系统:/

被折叠的 条评论
为什么被折叠?