diff options
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java index 98bb6f5..f48d3ad 100644 --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java @@ -620,6 +620,23 @@ public class JNLPRuntime { } } + /** + * @return true if running on Windows + */ + public static boolean isWindows() { + String os = System.getProperty("os.name"); + return (os != null && os.startsWith("Windows")); + } + + /** + * @return true if running on a Unix or Unix-like system (including Linux + * and *BSD) + */ + public static boolean isUnix() { + String sep = System.getProperty("file.separator"); + return (sep != null && sep.equals("/")); + } + public static void setInitialArgments(List<String> args) { checkInitialized(); SecurityManager securityManager = System.getSecurityManager(); |