Results 1 to 7 of 7
- 11-25-2008, 12:47 PM #1
Member
- Join Date
- Nov 2008
- Posts
- 1
- Rep Power
- 0
- 11-25-2008, 04:02 PM #2
Senior Member
- Join Date
- Aug 2008
- Posts
- 384
- Rep Power
- 5
It is possible, I don't know how though.
I die a little on the inside...
Every time I get shot.
- 11-25-2008, 04:18 PM #3
Try looking into the code of SWT commands. Those are all very platform aware and the same GUI command will display different based on if it detects M$, Linux, Mac, etc
- 11-26-2008, 12:11 PM #4
Member
- Join Date
- Nov 2008
- Posts
- 19
- Rep Power
- 0
try this:
Java Code:String OS = System.getProperty("os.name"); System.out.println(OS);Last edited by Tamu; 11-26-2008 at 12:12 PM. Reason: for better outlook
- 11-27-2008, 05:53 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 11-27-2008, 06:40 AM #6
ossificaton
Dont know what the other os's are named.Java Code:java.lang.String osName = System.getProperty("os.name"); // Whether we are working around Solaris. final boolean solarisWorkaround = (osName != null && osName.indexOf("Solaris") != -1);Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 11-27-2008, 07:38 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Much better,
Java Code:String osName = System.getProperty("os.name"); if(osName.startsWith("Mac OS")){ // Do the processing }
Similar Threads
-
USB Detection
By alanixu in forum New To JavaReplies: 3Last Post: 11-12-2008, 04:04 PM -
Collision Detection (Game)
By mscwd in forum Sun Java Wireless ToolkitReplies: 0Last Post: 01-28-2008, 08:34 PM -
Accessing client file system
By revathi17 in forum New To JavaReplies: 1Last Post: 10-17-2007, 10:17 AM -
finding Operating System specific data
By FrankyDee in forum New To JavaReplies: 2Last Post: 09-28-2007, 03:27 PM -
Tracking Operating System
By Mansi in forum NetworkingReplies: 2Last Post: 07-23-2007, 01:41 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks