Apache POI PPT Installation Apache POI PPT

How to install Apache POI PPT?

This chapter will give detailed description on how to set up Apache POI on Windows and Linux based systems. Apache POI can be easily installed and integrated with the current Java environment by just following some easy steps without any complex setup procedures. Remember that user administration is required for the installation.

System Requirements

JDK

Java SE 2 JDK 1.5 or above

Memory

1 GB RAM (recommended)

Disk Space

No minimum requirement

Operating System Version

Windows XP or above, Linux

Below are the steps for installing Apache POI.

Step 1: Verify your Java Installation

First, Java Software Development Kit (SDK) should be installed on your system and to verify this, execute any of below two commands based on the platform you are working on.

After installing java successfully, it will display the current version and specification of your Java installation. A sample output is given in below table.

Platform

Command

Sample Output

Windows

Open Command Console and type:

\>java –version

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)

Linux

Open Command terminal and type:

$java –version

java version "1.7.0_25"

Open JDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64)

Open JDK 64-Bit Server VM (build 23.7-b01, mixed mode)

  • We are assuming that the readers of this tutorial have installed Java SDK version 1.7.0_60 on their system.
  • If you do not have Java SDK, download its current version from http://www.oracle.com/technetwork/java/javase/downloads/index.html and install it.

Step 2: Set your Java Environment

Set the environment variable JAVA_HOME so that it points to the base directory location where Java is installed on your machine. For example,

Platform

Description

Windows

Set JAVA_HOME to C:\ProgramFiles\java\jdk1.7.0_60

Linux

Export JAVA_HOME=/usr/local/java-current

Append the full path of Java compiler location to the System Path.

Platform

Description

Windows

Append the String "C:\Program Files\Java\jdk1.7.0_60\bin" to the end of the system variable PATH.

Linux

Export PATH=$PATH:$JAVA_HOME/bin/

Execute the command java -version from the command prompt as explained above.

Step 3: Install Apache POI Library

Download the latest version of Apache POI from http://poi.apache.org/download.html and unzip its contents to a folder so that the required libraries can be linked to your Java program. Let’s assume that the files are collected in a folder on C drive.

Below images show the directories and the file structures inside the downloaded folder:

jar_hirarchi

Add the complete path of the five jars as highlighted in the above image to the CLASSPATH.

Platform

Description

Windows

Append the following strings to the end of the user variable CLASSPATH:

“C:\poi-3.9\poi-3.9-20121203.jar;”

“C:\poi-3.9\poi-ooxml-3.9-20121203.jar;”

“C:\poi-3.9\poi-ooxml-schemas-3.9-20121203.jar;”

“C:\poi-3.9\ooxml-lib\dom4j-1.6.1.jar;”

“C:\poi-3.9\ooxml-lib\xmlbeans-2.3.0.jar;.;”

Linux

Export CLASSPATH=$CLASSPATH:

/usr/share/poi-3.9/poi-3.9-20121203.tar:

/usr/share/poi-3.9/poi-ooxml-schemas-3.9-20121203.tar:

/usr/share/poi-3.9/poi-ooxml-3.9-20121203.tar:

/usr/share/poi-3.9/ooxml-lib/dom4j-1.6.1.tar:

/usr/share/poi-3.9/ooxml-lib/xmlbeans-2.3.0.tar

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Apache POI PPT Topics