|JDK||Memory||Disk Space||Operating System Version|
|Java SE 2 JDK 1.5 or above||1 GB RAM (recommended)||No minimum requirement||Windows XP or above, Linux|
Let us now proceed with the steps to install Apache POI.
First of all, you need to have Java Software Development Kit (SDK) installed on your system. To verify this, execute any of the two commands mentioned below, depending on the platform you are working on.
If the Java installation has been done properly, then it will display the current version and specification of your Java installation. A sample output is given in the following table:
Open command console and type:
Java version "1.7.0_60"
Java (TM) SE Run Time Environment (build 1.7.0_60-b19)
Java Hotspot (TM) 64-bit Server VM (build 24.60-b09,mixed mode)
Open command terminal and type:
java version "1.7.0_25"
Open JDK Runtime Environment (rhel-22.214.171.124.el6_4-x86_64)
Open JDK 64-Bit Server VM (build 23.7-b01, mixed mode)
Set the environment variable JAVA_HOME to point to the base directory location where Java is installed on your machine. For example,
Append the full path of Java compiler location to the System Path.
|Windows||Append the String "C:\Program Files\Java\jdk1.7.0_60\bin" to the end of the system variable PATH.|
Execute the command java - version from the command prompt as explained above.
Download the latest version of Apache POI from http://poi.apache.org/download.html and unzip its contents to a folder from where the required libraries can be linked to your Java program. Let us assume the files are collected in a folder on C drive.
The following images shows the directories and the file structure inside the downloaded folder:
Add the complete path of the five jars as highlighted in the above image to the CLASSPATH.
Append the following strings to the end of the user variable CLASSPATH: