Servlets are just like any other Java class. If you're not familiar with javac, classpaths, and packages (things you need to know in order to compile Java programs) the best place to go for advice is our Java In General (Beginner forum).