This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Why the MalformedURLException? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Why the MalformedURLException?" Watch "Why the MalformedURLException?" New topic
Author

Why the MalformedURLException?

Thomas Kennedy
Ranch Hand

Joined: Jan 20, 2008
Posts: 137
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




Costs matter. Justice lies in processes not outcomes. Crime is caused by criminals.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35446
    
    9
You shouldn't encode the URL before creating the URL instance.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Why the MalformedURLException?
 
Similar Threads
removing jsp page address in url
startElement not called, why not?
url reader applet
how to read files from internet
Reading dll version in java or any other method.