Results 1 to 5 of 5
  1. #1
    mikey1115 is offline Member
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default Eclipse Configuration(JAVA Applet) - I am trrying run my HW

    Originally, I used TextPad instead of Eclipse.
    Then, now i am trying to run my HW in Eclipse, but it doesnt work.
    I think I successfully added the independant JAR file which is used for this HW.
    Am I missing something?
    Error says something about Image(Unknown source) blah blah

    java.lang.NullPointerException
    at sun.awt.image.URLImageSource.<init>(Unknown Source)
    at sun.applet.AppletImageRef.reconstitute(Unknown Source)
    at sun.misc.Ref.get(Unknown Source)
    at sun.applet.AppletViewer.getCachedImage(Unknown Source)
    at sun.applet.AppletViewer.getImage(Unknown Source)
    at java.applet.Applet.getImage(Unknown Source)
    at objectdraw.Controller.getImage(Controller.java:112 )
    at SpaceInvaders.begin(SpaceInvaders.java:62)
    at objectdraw.WindowController.init(WindowController. java:74)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


    Is it about location of Image?
    Pls Help me Thank u.
    Last edited by mikey1115; 09-13-2011 at 08:02 PM.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,658
    Blog Entries
    7
    Rep Power
    21

    Default Re: Eclipse Configuration(JAVA Applet) - I am trrying run my HW

    Quote Originally Posted by mikey1115 View Post
    Error says something about Image(Unknown source) blah blah
    I'm sure Eclipse didn't say 'blah blah'; it just complained that it couldn't find the source code for the Image class because you wanted to open its source. There is a file src.zip in the directory where your JDK is installed. Mention it to Eclipse when you want to attach sources to the classes. Eclipse will do the rest of the work.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    mikey1115 is offline Member
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default Re: Eclipse Configuration(JAVA Applet) - I am trrying run my HW

    Thanks for response.
    I posted the error that I get
    How do i mention images to Eclipse?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,658
    Blog Entries
    7
    Rep Power
    21

    Default Re: Eclipse Configuration(JAVA Applet) - I am trrying run my HW

    Quote Originally Posted by mikey1115 View Post
    Thanks for response.
    I posted the error that I get
    How do i mention images to Eclipse?
    Try this: right click on your project; select Properties>Libraries; expand the rt.jar library entry; you'll see an 'source location' and 'javadoc location'; select that src.zip file there.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,993
    Rep Power
    9

    Default Re: Eclipse Configuration(JAVA Applet) - I am trrying run my HW

    Quote Originally Posted by mikey1115 View Post
    Error says something about Image(Unknown source) blah blah
    The answer is to blah blah blah.

    (see how useful that isn't?)
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Running as Java Applet in eclipse
    By atomant in forum New To Java
    Replies: 0
    Last Post: 12-05-2010, 02:22 AM
  2. VM arguments from run configuration (Eclipse)
    By Hussain Ali in forum Eclipse
    Replies: 4
    Last Post: 02-26-2010, 12:34 PM
  3. struts configuration in eclipse Europa
    By Srikanth goud in forum Eclipse
    Replies: 0
    Last Post: 10-16-2008, 07:50 AM
  4. Replies: 0
    Last Post: 07-18-2008, 09:14 AM
  5. Replies: 5
    Last Post: 06-15-2007, 01:32 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •