Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error with Url with java  RSS feed

 
david luis
Ranch Hand
Posts: 53
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Eclipse gives me these error with this code in java:

Error:
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
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 53751
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!