I am trying to implement an autocomplete Combo in SWT using <a href="http://www.mirrorservice.org/sites/downloads.sourceforge.net/s/sw/swtaddons/swtaddons/SWT%20Add-ons%200.1.1/SWTAddons-Documentation-0.1.1.html" rel="nofollow">AutocompleteComboInput</a>. I have added <a href="http://sourceforge.net/projects/swtaddons/files/swtaddons/SWT%20Add-ons%200.1.1/" rel="nofollow">net.sf.swtaddons_0.1.1_bin_src.jar</a> 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 href="https://stackoverflow.com/questions/34413/why-am-i-getting-a-noclassdeffounderror-in-java" rel="nofollow">a class is not found during runtime</a>.
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.Answer1:
I have found the solution to this problem.
net.sf.swtaddons_0.1.1_bin_src.jar, 3 other JARs were still needed to be added to the Library: