where am I? linux or Solaris?

hi, does anyone know how you determine, whether you are running a java application in Linux, solaris, or even windows?how do i get this info while running a java app? ... using java code... you know, platform independent....thx
[255 byte] By [al770813] at [2007-9-26 2:34:34]
# 1
I am not sure if there is a method that will detrmine the platform type, but what I would do , test if the dir c:\winnt or c:\windows dose exist, if so, then this is obivously windows, otherwise I will execute the command "uname" and get the OS type on solaris or linux.
hector111 at 2007-6-29 9:59:26 > top of Java-index,Archived Forums,Java Programming...
# 2
experiment with this:System.out.println(System.getProperty("os.name"));--lichu
lichudang at 2007-6-29 9:59:26 > top of Java-index,Archived Forums,Java Programming...