1

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.
Geoffrey Hale
  • 10,597
  • 5
  • 44
  • 45

1 Answers1

1

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.

Bohuslav Burghardt
  • 33,626
  • 7
  • 114
  • 109
  • Yes, of course! I changed the import line to: `import com.jgoodies.forms.layout.FormSpecs`. And it worked just fine (after I installed the common library too). – Geoffrey Hale Nov 12 '14 at 03:27