org.eclipse.swt.*; The import org.eclipse cannot be resolved -
i trying write small program requires import statement import org.eclipse.swt.*;
. (i'm practicing this tutorial).
however, eclipse won't compile program , giving me error "the import org.eclipse cannot resolved
"
google hasn't been such a great friend @ finding answer time.
this because haven't added swt library buildpath. follow steps of tutorial:
- download swt library. 3.1.2 version of eclipse, swt library available @ http://archive.eclipse.org/eclipse/downloads/drops/r-3.1.2-200601181600/index.php section titled swt binary , source.
- from main menu tool bar, select "file" followed "import". doing bring "import wizard" dialog.
- now select "existing projects workspace" , click on "next" button.
- click on "select archive file" followed "browse" button. locate swt archive downloaded in step 1.
- click finish button finish importing swt project workspace.
- create new java project file > new java project.
- right-click on project , select properties command open properties dialog.
- select java build path followed projects tab , click add button.
- select org.eclipse.swt project , click ok finish adding swt libraries project's classpath
Comments
Post a Comment