File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java open url

 
Shubhanshu Gupta
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to open a url in java?
 
Tim Moores
Bartender
Pie
Posts: 2496
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(new java.net.URL(...)).openStream()
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shubhanshu Gupta wrote:how to open a url in java?


That depends exactly what you mean by that. There are at least two obvious possible interpretations. If you don't TellTheDetails(⇐ click) and ask a clear, precise question, it makes it difficult for people to help you.
 
Rob Spoor
Sheriff
Pie
Posts: 20380
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff is right. Tim's example will open the URL in code only, it won't be made visible. To open a URL visibly you need a completely separate approach (hint: java.awt.Desktop).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic