environmentutils.java
来自「《j2ee开发全程实录》随书源码」· Java 代码 · 共 56 行
JAVA
56 行
package com.cownew.ctk.common;
public class EnvironmentUtils
{
public static String getLineSeparator()
{
return System.getProperty("line.separator");
}
public static String getPathSeparator()
{
return System.getProperty("path.separator");
}
public static String getFileSeparator()
{
return System.getProperty("file.separator");
}
public static String getOSName()
{
return System.getProperty("os.name");
}
public static String getOSVersion()
{
return System.getProperty("os.version");
}
public static String getUserName()
{
return System.getProperty("user.name");
}
public static String getUserHome()
{
return System.getProperty("user.home");
}
public static String getUserDir()
{
return System.getProperty("user.dir");
}
public static String getTempDir()
{
return System.getProperty("java.io.tmpdir");
}
public static String getClassPathSeparator()
{
return "/";
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?