wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes how to detect the operating system in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to detect the operating system in java" Watch "how to detect the operating system in java" New topic
Author

how to detect the operating system in java

sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
Is there a way to tell whether the current platform is linux or windows?

Thanks,

Sonia
Anuj Prashar
Ranch Hand

Joined: Apr 15, 2008
Posts: 99

Try this . .


SCJP 5,SCWCD 5, RHCT
sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
What is the return value in case of Linux and 2) in case of Windows.

Thanks

Sonia
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

You can probably use a s.o.p to check the return value.


Swastik
sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
What is s.o.p?
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

Sorry about that,

 
Consider Paul's rocket mass heater.
 
subject: how to detect the operating system in java