Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why the MalformedURLException?

 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me why I get a MalformedURLException -- see line 05 below -- when I run this code? I am using JDK 1.3. (I know it's ancient; using a newer jdk is not an option.)

java.net.MalformedURLException: no protocol: http%3A%2F%2Fdevelopers.sun.com%2Frss%2Fsdn_features.xml


 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't encode the URL before creating the URL instance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic