Source not found

Hi, I am new to Eclipse, the version I use is 3.0. I have a project "classes", which contains a package "myFolder", and a servlet "" in under "myFolder".

I wish to compile "" in order to get myClass.class under myFolder. What I do to compile it, is by clicking on the debug button.(I can't find any compile option, so I choose debug instead, but is there any compile option?)

However, it prompts me a page called "Class File Editor"

The contents is
Source not found
The source attachment does not contain the source for the file URLClassLoader.class
You can change the source attachment by clicking Change Attached Source below:

How to deal with this situation?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

the class will be generated in myFolder . you dont have to compile it explicitly

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mick BarryJava DeveloperCommented:
eclipse supports auto compilation, look under Project menu
<eclipse home>\workspace\classes\myFolder
i think u will find your class file "myClass.class" in above folder

<eclipse home> - is the path where u have installed eclipse
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Mick BarryJava DeveloperCommented:
> I wish to compile "" in order to get myClass.class under myFolder

goto your project setting>build path and set the output folder for your source folder
If you look in your file system, you may find it's already compiled. As avinthm mentioned, compilation is done automatically by default
william007Author Commented:
Yes, thanks..I get the class.
But what is the error page about when I click on the debug button?
Mick BarryJava DeveloperCommented:
> But what is the error page about when I click on the debug button?

Its looking for the source to display in the debugger but doesn't know where it is
so it is asking you.
william007Author Commented:
Is the source refer to
When I click on the Change Attached Source button under it,
It prompts me a dialog and asks me to
"Select the location (folder, JAR or zip) containing the source for 'rt.jar',"
I select
C:/Program Files/Java/j2re1.4.2_05/lib/rt.jar,
After that I try to debug again,
the same problem still occur..

May I know how to solve it?
Mick BarryJava DeveloperCommented:
no its looking for URLClassLoader
point it as in the jdk base directory
It's looking for a dependent class' source
william007Author Commented:
Thanks, I point it to, no error occur now.
My last question is may I know what is happening? Since contains all the source file(.java) for Java API, and it doesn't have any .class file that can be used..what eclipse trying to do with that

Followed is the problem when I click on Run...

And those are the related question
Mick BarryJava DeveloperCommented:
it needs them to display source during debugging.
the class file does not contain source, just byte code
william007Author Commented:
Fantastic, thanks:-)
Mick BarryJava DeveloperCommented:
no worries :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.