I have been trying to setup swt in eclipse Juno, but it keeps on giving me errors. Here is the error list:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-4233 in java.library.path
no swt-win32 in java.library.path
Can't load library: C:\Users\DeoFamily\.swt\lib\win32\x86_64\swt-win32-4233.dll
Can't load library: C:\Users\DeoFamily\.swt\lib\win32\x86_64\swt-win32.dll
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at HelloWorldSWT.main(HelloWorldSWT.java:12)
Here is the code:
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class HelloWorldSWT {
/**
* @param args
*/
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Hello world!");
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
I have already imported the SWT folder into my project, but it is still not working. What am I doing wrong?