1.1 --- a/src/main/java/cz/xelfi/feedbook/Main.java Wed Nov 10 08:53:58 2010 +0100
1.2 +++ b/src/main/java/cz/xelfi/feedbook/Main.java Wed Nov 10 17:26:00 2010 +0100
1.3 @@ -6,6 +6,7 @@
1.4 import com.sun.syndication.feed.rss.Channel;
1.5 import com.sun.syndication.feed.rss.Item;
1.6 import com.sun.syndication.io.WireFeedInput;
1.7 +import java.awt.Desktop;
1.8 import java.io.IOException;
1.9 import java.net.URI;
1.10 import java.net.URISyntaxException;
1.11 @@ -23,8 +24,11 @@
1.12 final String token = login.auth_createToken();
1.13 URI u = new URI("http://www.facebook.com/login.php?api_key=" + APP_KEY + "&auth_token=" + token);
1.14 System.out.println("authentication: " + u);
1.15 - Runtime.getRuntime().exec("xdg-open " + u);
1.16 - //Desktop.getDesktop().browse(u);
1.17 + try {
1.18 + Desktop.getDesktop().browse(u);
1.19 + } catch (Exception ex) {
1.20 + Runtime.getRuntime().exec("xdg-open " + u);
1.21 + }
1.22 System.out.println("Visit the browser and press enter...");
1.23 System.in.read();
1.24