when I was doing the Java visualizer, I used the following several packages, how to deal with: (Eclipse Environment)
import Org.eclipse.swt.SWT;
import Org.eclipse.swt.widgets.Display;
import Org.eclipse.swt.widgets.Shell;
Tip: The import org.eclipse can is resolved.
Introduction Method:
under Eclipse's plugins directory, locate the file Org.eclipse.swt.win32.win32.x86_3.2.1.v3235.jar,
The 3.2.1 in the file name is the version number of Eclipse, v3235 is the serial number of the SWT, and the different eclipse versions of the two
The numbers are also different.
extract the Org.eclipse.swt.win32.win32.x86_3.2.1.v3235.jar to the current directory
the next. Get four DLL files after decompression: Swt-win32-3235.dll, Swt-awt-win32-3235.dll,
Swt-gdip-win32-3235.dll and Swt-wgl-win32-3235.dll. These four files are the original library files for SWT. Original
The Raw library file provides an interface for SWT to access the Windows Local API through JNI, so that Java programs can
access to these files can be set in the following ways:
method One: Copy the four DLL files to the bin directory of the JRE.
method Two: Set the environment variables, and add the directories of these DLL files in path.
method Three: Import the native library files in the Eclipse Java project. How to do this:
in the Eclipse Package Explorer, right-click the project name → import → general → file system → Next → Browse
→ select dll file directory → ok → check dll file → complete.
after importing the SWT native library file, you also configure the build path in the Eclipse Java project, add the external jar,
To add a file Org.eclipse.swt.win32.win32.x86_3.2.1.v3235.jar to your project, do this by:
in the Eclipse Package Explorer, right-click the project name → build path → configure build path → library (L) → Add
Add external jar→ Find the jar file in the Eclipse's plugins folder → open → ok.
Introduction of ORG.ECLIPSE.SWT Package