Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
how to detect the operating system in java
sonia pandit
Ranch Hand
Posts: 137
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Is there a way to tell whether the current platform is linux or windows?
Thanks,
Sonia
Anuj Prashar
Ranch Hand
Posts: 99
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Try this . .
System.getProperty("os.name");
SCJP 5,SCWCD 5, RHCT
sonia pandit
Ranch Hand
Posts: 137
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What is the return value in case of Linux and 2) in case of Windows.
Thanks
Sonia
Swastik Dey
Bartender
Posts: 2270
20
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can probably use a s.o.p to check the return value.
Swastik
sonia pandit
Ranch Hand
Posts: 137
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What is s.o.p?
Swastik Dey
Bartender
Posts: 2270
20
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Sorry about that,
System.out.println(System.getProperty("os.name"));
Swastik
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to detect whether java installed or not ?
Need help to create an .sh or .bin file
eclipse: not platform independent ???
Current System date & time(URGENT)
Cross Platform Fonts
More...