Created
          November 29, 2017 19:06 
        
      - 
      
- 
        Save ShmuelMofrad/43bc9f5dd29654cf6515d6e47403f8ca to your computer and use it in GitHub Desktop. 
    Check if you have desktop - java
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.awt.Desktop; | |
| public class HaveYouDesktop { | |
| public static void main(String[] args) { | |
| if(isDesktopSupported()) { | |
| System.out.println("Yes, Desktop Supported!"); | |
| } else { | |
| System.out.println("Not Desktop Supported!"); | |
| } | |
| } | |
| private static boolean isDesktopSupported() { | |
| if(Desktop.isDesktopSupported()) { | |
| return true; | |
| } else { | |
| return false; | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment