package models; import java.awt.Desktop; import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; public class Links { private static String FAQ = "http://bwlehrpool.hs-offenburg.de/"; private static String OTRS = "https://bwlehrpool-otrs.rz.hs-offenburg.de//otrs/customer.pl"; private static String uriWindows="https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; private static String uriLinux="https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; public static String getFAQ() { return FAQ; } public static String getOTRS() { return OTRS; } <<<<<<< HEAD public static void openFAQ() { String faq = FAQ; Runtime rt = Runtime.getRuntime(); String os = System.getProperty("os.name"); try { if (os.indexOf( "Win" ) >= 0) { // this doesn't support showing urls in the form of "page.html#nameLink" rt.exec( "rundll32 url.dll,FileProtocolHandler " + faq); } else if (os.indexOf( "Mac" ) >= 0) { rt.exec( "open " + faq); } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) { // Do a best guess on unix until we get a platform independent way // Build a list of browsers to try, in this order. String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror", "netscape","opera","links","lynx"}; // Build a command string which looks like "browser1 "url" || browser2 "url" ||..." StringBuffer cmd = new StringBuffer(); for (int i=0; i= 0) { // this doesn't support showing urls in the form of "page.html#nameLink" rt.exec( "rundll32 url.dll,FileProtocolHandler " + otrs); } else if (os.indexOf( "Mac" ) >= 0) { rt.exec( "open " + otrs); } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) { // Do a best guess on unix until we get a platform independent way // Build a list of browsers to try, in this order. String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror", "netscape","opera","links","lynx"}; // Build a command string which looks like "browser1 "url" || browser2 "url" ||..." StringBuffer cmd = new StringBuffer(); for (int i=0; i>>>>>> 5d24cdec4d239f473ee2359493ab47d1ef3273dd }