Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL redirection Program not working.

 
v ray
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.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • 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: 42970
73
  • 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: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need an HTML file that contains an APPLET tag.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!