My eclipse IDE sucks. When I type some code in the scrapbook it gives me this message "invalid syntax import delete this token" It always seems to give me an error message. I then type the code in netbeans and it compiles.
Eclipse scrapbook pages aren't meant to contain complete Java translation units, just short snippets of executable code. You can't type import statements or package statements, among other things.
Instead, to import classes to a scrapbook page, right-click to get the context menu, and pick "Set imports".
Mr. wong you can delete my posting or otherwise dispose of it. I think the other gentleman enlightened me that I was expecting too much of the scrapbook. I still have a lot to learn about using these IDE's