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:

  1. 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.
  2. from main menu tool bar, select "file" followed "import". doing bring "import wizard" dialog.
  3. now select "existing projects workspace" , click on "next" button.
  4. click on "select archive file" followed "browse" button. locate swt archive downloaded in step 1.
  5. click finish button finish importing swt project workspace.
  6. create new java project file > new java project.
  7. right-click on project , select properties command open properties dialog.
  8. select java build path followed projects tab , click add button.
  9. select org.eclipse.swt project , click ok finish adding swt libraries project's classpath

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -