Q:

Java imported package does not exist

I am trying to use pdfbox to write a simple pdf file but the problem is that I am getting error : 
cannot find symbol class PDDocument

I have downloaded the jar files into the same folder the program exists.  How to fix this compilation error?
package org.apache.pdfbox.pdmodel.PDDocument;

import java.io.*;
import org.apache.pdfbox.pdmodel.PDDocument;

public class pdf
{
public static void main(String args[])
{
}
}

A:

Putting the jar in the same folder or package does not add it to the class path. You need to mention the path of the jar in your class path while running your java program. Here is the syntax for that:
To compile:
javac -classpath .;yourjar.jar src/your/package/*.java

To run
java -classpath .;yourjar.jar src/your/package/yourprogrammeclassname

