facebook

[Closed] JDK classes, source not found

  1. MyEclipse Archived
  2.  > 
  3. General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #270860 Reply

    Charles
    Member

    IDE – MyEclipse Enterprise Workbench Version: 5.1.0 GA Build id: 20061111-5.1.0-GA

    JAVA path: C:\Program Files\java

    System Variables – Path: %JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;\pucdocsserver\DOCSOpen;C:\Program Files\Microsoft SQL Server\Tools\BINN;c:\Program Files\Microsoft SQL Server\Tools\binn\;C:\Program Files\Microsoft SQL Server\Tools\Binn\;C:\Program Files\Microsoft SQL Server\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\FileNet\Content Engine;C:\Program Files\java\jdk1.5.0_09\bin

    Code snippet:

    import java.awt.*;
    import java.awt.event.*;

    /**
    * —————————————————————————–
    * This class provides an example of a simple AWT frame that contains an
    * example toolbar implementation made up of several AWT button objects.
    * This example will contain three buttons typically found in toolbar –
    * Copy, Cut, and Paste.
    *
    * @version 1.0
    * @author Jeffrey M. Hunter (jhunter@idevelopment.info)
    * @author http://www.idevelopment.info
    * —————————————————————————–
    */

    public class AWTExample extends Frame {

    // Object fields
    private Button copyButton;
    private Button cutButton;
    private Button pasteButton;
    private Button exitButton;

    /**
    * Public no-arg constructor
    */
    public AWTExample() {

    super(“Simple AWT Example”);
    setSize(450, 250);

    addWindowListener(
    new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    }
    }
    );

    Situation: Source not found
    Description: The source attachment does not contain the source for the file WindowAdapter.class.

    Java Build Path is pointing to the correct path.

    Question: Is this an issue or something I can ignore? I have reviewed the help docs and attempted all of the resolutions contained there.

    Thanks,

    Chuck

    #270978 Reply

    Riyad Kalla
    Member

    Chuck,
    You can ignore it if it’s not a show stopper for you. The warning messages is just showing you that you don’t have source attached for the WindowAdapter class, which is from Swing. Which means you need to attach the JDK source to your JRE if you want to debug into the JDK classes.

    If you decide to do that, you can go to Window > Prefs > Java > Installed JREs, and select the JRE you are using for your project and hit edit, then attach source to rt.jar.

    And easier trick, is to instead click Add, and select a JDK install dir (not JRE) and MyEclispe will auto-attach the src.zip to the JAR files if it’s available which is handy. Then change your project to use that “JRE” (it’s actually a JDK) in it’s build path.

    #270998 Reply

    Charles
    Member

    Riyad,

    Thank you for the information. Not a show stopper, just an annoyance 🙂 It’s just nice to have all your i’s dotted and t’s crossed when it comes to developing.

    Chuck

    #271000 Reply

    Riyad Kalla
    Member

    I definitely understand that.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] JDK classes, source not found

You must be logged in to post in the forum log in