Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem using "URL", Cannot Resolve Symbol

 
Matt Wil
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I saw the code below post to load images from a Jar in an Applet. I keep getting the error "Cannot Resolve Symbol" or "Cannot be resolved or is not a type(from Eclipse)" because of the "URL" statement.
Do I need to import a certain class?
Thanks!
URL url = <classname>.class.getResource("picture.gif");
Image i=Toolkit.getDefaultToolkit().getImage(url);
 
Matt Wil
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll answer my own dumb question:
import java.net.URL;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic