Which IDE are you using? Your IDE should be able to detect this kind of problems.
You need to add a new import statement like this:
import org.jivesoftware.smack.packet.*;
I’‘d recommend changing the name of your class to something different than message (maybe confused with Smack’'s Message) and it should also start with an uppercase letter.
my IDE is the command line I don’'t have a IDE yet, can you prefer a good (=simple) one for me on Linux?
The import statement did the trick, but I don’'t know why I thought import org.jivesoftware.smack.* would import everything (because of the *) but it seems that I was wrong.
Where can I get a list of import statements and how do I know which one I need for the different methods in my source?
Personally I’‘m using Scite ( http://www.scintilla.org/SciTE.html ) , which is a good text editor and works well if you’'re into handcoding Java.
Regarding the import statements,
import org.jivesoftware.smack.*;
imports all the classes of the org.jivesoftware.smack package - it won’'t include any “child” packages such as org.jivesoftware.smack.packet.
To know which package(s) you need to import for a paricular class, in the Javadoc that comes with smack, look at the top of the page - it will say which package the class is part of.