Home > io > addJavaPaths.m

addJavaPaths

PURPOSE ^

addJavaPaths

SYNOPSIS ^

function addJavaPaths()

DESCRIPTION ^

 addJavaPaths
   Adds the Apache POI classes to the static Java paths

 Usage: addJavaPaths()

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % addJavaPaths
0002 %   Adds the Apache POI classes to the static Java paths
0003 %
0004 % Usage: addJavaPaths()
0005 
0006 function addJavaPaths()
0007 %Get the path to Apache POI
0008 ravenPath=findRAVENroot();
0009 poiPATH=fullfile(ravenPath,'software','apache-poi');
0010 
0011 toAdd={fullfile(poiPATH,'dom4j-1.6.1.jar');
0012     fullfile(poiPATH,'poi-3.8-20120326.jar');
0013     fullfile(poiPATH,'poi-ooxml-3.8-20120326.jar');
0014     fullfile(poiPATH,'poi-ooxml-schemas-3.8-20120326.jar');
0015     fullfile(poiPATH,'xmlbeans-2.3.0.jar');
0016     fullfile(poiPATH,'stax-api-1.0.1.jar')};
0017 
0018 existingPaths=javaclasspath();
0019 
0020 %Add the paths that are not already present
0021 for i=1:numel(toAdd)
0022     if ~any(ismember(existingPaths,toAdd{i}))
0023         javaaddpath(toAdd{i});
0024     end
0025 end
0026 end

Generated by m2html © 2005