Java Build Path Projects [message #79234] |
Mon, 20 June 2005 21:39  |
Eclipse User |
|
|
|
I created a project that has specific file processing capabilities. I
created another project that needed to use those same capabilities. I
right clicked on the project, selected properties->Java Build Path and
then the Projects tab. I then added the project that has the capabilities
that my new project needs.
However, my new project does not seem to recognize the methods from the
existing project. I then added a import statement with the package name
the methods that I need from the first project. As I entered the package
name it seemed to recognize the source of the package. It did not recieve
an error message and provided the final part of the package name as I
typed it. However, when I tried to create a new instance it the class
from the package it still did not recognize it.
Everything seems to be setup correctly. Can someone please provide me
with a suggestion.
Thanks,
Ben
|
|
|
|
|
|
Re: Java Build Path Projects [message #79467 is a reply to message #79334] |
Tue, 21 June 2005 20:28   |
Eclipse User |
|
|
|
Originally posted by: plankton.softwitch.net
David Wegener wrote:
> Ben wrote:
>
>> jiyul,
>
>
>> Thanks for your help. However, this just creates a new problem. It
>> elimenates any source code errors that I was getting from the missing
>> class. However when I run the code, it fails when it trys to
>> instantiate a new instance of the class. It gets an error
>> "ClassNotFoundException". However, if I take the same class files
>> from the old project and copy them into my new project I no longer get
>> this error. The code works perfectly fine without any alterations.
>> Of course, I would prefer not to have to copy the code since it would
>> require maintenace of two separate copies of the same code. So, I
>> looking for any help that I can get. Below is a copy of the line of
>> code that fails:
>
>
>> FileProcessing fp = new FileProcessing();
>
>
>> Again, this works perfectly fine if I copy the class files from the
>> old project but if I try to reference the old project I get an error.
>
>
>> Thanks for any help that you can provide,
>> Ben
>
>
> You have the other project on the Build Path. You need to get it on the
> Run Path. Open up the launch configuration and go to the Classpath
> tab. The other project needs to be included
>
Yeah, I'll be work. Sorry, I missed.
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.34139 seconds