Documentation‎ > ‎

Using JExcel under Eclipse

Creating and configuring Java project

To use the JExcel in your project you need the JExcel distribution package and license files - jniwrapper.lic, comfyj.lic and jexcel.lic. Unpack the JExcel package into any folder, and put the license files into bin subfolder.

Eclipse uses the bin folder to store its compiled files by default and JExcel uses this folder to store its native libraries like JNIWrapper and license files. That is why we recommend renaming Eclipse directory for class files before using (for example into “Eclipse_bin”). Otherwise, Eclipse will delete native libraries from the bin folder when you clear project build results.

Figure 1. Configuring eclipse project

Copy the JExcel distribution folder into your new project folder. This is not obligatory but it makes the work process and writing of build scripts easier.

Configuring the Build Path

Please right click on the project in the project tree and select the Configure Build Path settings as shown in Figure 2:

Figure 2. Access to build path configure dialog

Add the jexcel-1.x.jar, jniwrap-3.x.x.jar, comfyj-2.x.jar and winpack-3.x.jar to the build path as shown in Figure 3 and Figure 4 .

Figure 3. Adding JExcel jars

Figure 4. Java Build Path configuring

Select the Source tab and double click on Native library location item. Set Location path to the bin folder (See Figure 5):

Figure 5. Native Library location configuring

Apply your changes and close the project properties dialog.

Now you can start your application by clicking the Run button. If you have done everything correctly your application will be started.