```
String arg="http://www.example.com/user.php?id=<URLRequest Method='GetByUID' />";
java.net.URI uri = new java.net.URI( arg );
java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
desktop.browse( uri );

```

I want to open the given link in default browser with the above code but it says the url is invalid...i tried escaping characters like ' also but its not working.
If i replace String arg="www.google.com"; then there is no problem and I am able to open google.com. 
Please help.