This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes error with Url with java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "error with Url with java" Watch "error with Url with java" New topic

error with Url with java

david luis
Ranch Hand

Joined: Mar 10, 2011
Posts: 39

Eclipse gives me these error with this code in java:

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Unhandled exception type MalformedURLException

Could you help me please?

Many thanks and sorry for my english
Joanne Neal

Joined: Aug 05, 2005
Posts: 3429
The definition of the URL class constructor says that it might throw a MalformedURLException. This is a checked exception, so your code needs to either catch or rethrow it. See the java exceptions tutorial for more details.

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38031
. . . and welcome to the Ranch
wood burning stoves
subject: error with Url with java
Similar Threads
URLConnection 422 Http Error response
Passing an image from CGI
parent location of a url
What is the Prototype for Main method in java
Sockets vs URL Based classes