Question

I am trying to implement an autocomplete Combo in SWT using AutocompleteComboInput. I have added net.sf.swtaddons_0.1.1_bin_src.jar to the library via "Add External JAR".

import net.sf.swtaddons.autocomplete.combo.AutocompleteComboInput;
...

subjectCodeCombo = new Combo(tab3Composite, SWT.DROP_DOWN);
// other code modifying Combo appearance here...

// returns a String[] of items retrieved from database
String[] subjectCodeArray = dbQuery.subjectsToArray();

subjectCodeCombo.setItems(subjectCodeArray);
subjectCodeCombo.setText("- SELECT -");
new AutocompleteComboInput(subjectCodeCombo); // throws an error

However, I am getting a NoClassDefFoundError. As I have read, it seems a class is not found during runtime.

I believe I need to do something about the "runtime classpath", but I am lost. Steps on how to resolve this in Eclipse IDE is appreciated.

Was it helpful?

Solution

I have found the solution to this problem.

Apart from net.sf.swtaddons_0.1.1_bin_src.jar, 3 other JARs were still needed to be added to the Library:

  • eclipse-equinox-common-3.5.0.jar
  • org.eclipse.core.commands.jar
  • org.eclipse.jface-3.6.0.jar
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top