title: Is there a way to get Root Directory in Java in a given File
body: <p>Background</p>
  
  <p>I'm creating an upload file functionality. I want to save the file in a given folder ("/uploadFiles"). I am currently testing in Windows but will run it in Linux. </p>
  
  <p>I know I can get the current working TOMCAT directory. Is there a way to get the root system directory of TOMCAT directory? Say if the current directory is "D:\apache\sample_web_project" it will get "D:\" then I can append the "D:\uploadFiles" then if its in Linux it will get "/etc/apache/sample_web_project" it will get "/etc"</p>