The portlet API is contained within a single JAR file. When compiling a portlet, include the classpath to the JAR file in order for the compilation to succeed. Ensure that PortalServer-base/lib/portlet.jar is in your classpath when compiling the portlet. For example, to compile, type:
javac -classpath PortalServer-base/lib/portlet.jar PrefPortlet.java
This compiled class file must be included in the WAR file that will be deployed on the Portal Server using the psadmin deploy subcommand.