• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem using "URL", Cannot Resolve Symbol  RSS feed

 
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
Boost this thread!