diff --git a/src/MATLAB/AddSQLiteToPath.m b/src/MATLAB/AddSQLiteToPath.m new file mode 100644 index 0000000000000000000000000000000000000000..9f696fff585765875fd59ff97153da4260bb9764 --- /dev/null +++ b/src/MATLAB/AddSQLiteToPath.m @@ -0,0 +1,26 @@ +function AddSQLiteToPath() + %CHECKJARPATH Summary of this function goes here + % Detailed explanation goes here + + if isdeployed() + return + end + %% ensure that the sqlite jar file is on the path + dynamicPaths = javaclasspath('-dynamic'); + bfIsLoaded = false; + if (~isempty(dynamicPaths)) + for i=1:length(dynamicPaths) + [~,name,~] = fileparts(dynamicPaths{i}); + if (strcmpi('sqlite-jdbc-3.21.0',name)) + bfIsLoaded = true; + break + end + end + end + + if (~bfIsLoaded) + curPath = mfilename('fullpath'); + [pathstr,~,~] = fileparts(curPath); + javaaddpath(fullfile(pathstr,'sqlite-jdbc-3.21.0.jar'),'-end'); + end +end \ No newline at end of file