Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

URL redirection Program not working.  RSS feed

 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


what is wrong with this program? Seems ok, But I type:
http://www.google.com

But nothing happens.
 
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works fine for me. Which browser and JRE are you using? Are there any messages in the Java Console?
[ May 23, 2007: Message edited by: Ulf Dittmer ]
 
v ray
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really? its working fine for you? I am trying to execute it through eclipse as a java applet, and does it matter if my default browser is firefox? I also have IE, but not sure which one the applet would try to use..
Also, there was no message on the console, the applet loads properly, but when i click on "go there", nothing happens, no response.
 
Ulf Dittmer
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse is not a browser. From the javadocs of the showDocument method:

This method may be ignored by applet contexts that are not browsers.


What happens if you run the applet in a browser?
 
v ray
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry if this sounds stupid, but how do I run the applet in a browser?
 
Ulf Dittmer
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need an HTML file that contains an APPLET tag.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!