Java import jgoodies.forms.factories.* cannot be resolved. (Eclipse Luna)

5.2k views Asked by At

I've inherited code that uses:

import com.jgoodies.forms.factories.FormFactory;

I'm attempting to build the project.

I've added the jgoodies-forms-1.8.0*.jar files to a 'lib' directory that I made at the same level as the 'JRE System Library' and 'Referenced Libraries' within my Project.

/project
|-- src
|   `--(...)
|-- JRE System Library
|-- Referenced Libraries
`-- lib
    |-- jgoodies-forms-1.8.0-javadoc.jar
    |-- jgoodies-forms-1.8.0-sources.jar
    |-- jgoodies-forms-1.8.0-tests.jar
    `-- jgoodies-forms-1.8.0.jar

At the source files that use FormFactory, Eclipse Luna 4.4 tells me that:

The import com.jgoodies.forms.factories.FormFactory cannot be resolved.

I understand that this is because jgoodies RELEASE-NOTES.txt:

CHANGES IN 1.6.0
    o Renamed FormFactory to FormSpecs.

I figured I could just change "FormFactories" to "FormSpecs" but I get:

The import com.jgoodies.forms.factories.FormSpecs cannot be resolved.
1

There are 1 answers

1
Bohuslav Burghardt On BEST ANSWER

Your package is wrong. According to this FormSpecs is located in com.jgoodies.forms.layout package in 1.8. Assuming that you have the libraries correctly set-up in Eclipse, changing the package should work.

Or just remove the unresolved import and hit CTRL+SHIFT+O to automatically organize the import statements.