Detecting operating system or computer name through a Java servlet -


I have a Java web app that I develop on a Windows machine and posted on Unix machine.

Some file path settings and permissions details that are different on two (and there is nothing I can change it). Is there a way to locate the machine sitting on the app (it's only one of two) by detecting the name of the operating system or computer, so I can use the proper settings.

  string computational name = InetAddress.getLocalHost ( 

) .getHostName (); Println (computername);

and to use the OS name

  java.lang.System.getProperty ("os.name")  

Abdul Khaliq


Comments