Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

link to a wbpage using default browser from a java application

 
glen li
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a single line of code I can use ? Thanks!

--Glenn
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not quite. If your code has to be portable between Windows, *nix and wherever else Java runs it gets harder. For Windows google for "java exec RunDLL32" to see some solutions. Some of those hits will include *nix alternatives too. Somebody posted some very short code for this purpose not long ago using another technique I can't remember. Search the Java in General forums for launchin browsers and you might bump into it.
 
glen li
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stan!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic