摘要:Java - 取得目前目錄絕對位置
public String getCurrentDirectory()
{
File now_directory = new File(".");
String current_path = now_directory.getAbsolutePath().replaceAll("\\.","");
return current_path;
}
public boolean isWin()
{
boolean isWin = false;
String current_path = this.getCurrentDirectory();
if(current_path.startsWith("/"))
{
isWin = false;
}
else
{
isWin = true;
}
return isWin;
}