Christian Wolf
Christian Wolf

Reputation: 1227

How to configure eclipse for 2 source folders correctly?

I have the following setup: I have an eclipse project which uses generated sourced (from SWIG). To avoid mixing them up I decided to have two different source locations: One with the main sources (which I develop by hand) and one that is a link to the directory where swig puts its output files.

Now if I try to use these classes in the swig directory, eclipse throws the error that the Class would not be found. If I copy the classes over, all right, that works.

What do I have to do to get it running?

Upvotes: 0

Views: 248

Answers (2)

Christian Wolf
Christian Wolf

Reputation: 1227

I found my answer:

Swig generated by default the classes in the default packages. As the rest of my classes are in packages organized, I just moved the generated classes to a package (using command line argument) and voila: Java did find the classes correctly.

Upvotes: 0

yatul
yatul

Reputation: 1111

Right click on folder in Project Explorer and select "Build path->Use as source folder"

Upvotes: 3

Related Questions