• Post Reply Bookmark Topic Watch Topic
  • New Topic

java open url  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to open a url in java?
 
Saloon Keeper
Posts: 4484
112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(new java.net.URL(...)).openStream()
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 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.
 
Sheriff
Posts: 21330
87
Chrome Eclipse IDE Java Windows
  • 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 miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!