Commit 9a3b0f7d authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Implement support for autoloading the java code into Matlab.

The java code now loads into Matlab automatically, but it uses a differnt
jar file location now.  Things work though.

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10668 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent e09f49f2
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function TTdiag(varargin)
% Java needs to be loaded here.  Thus load it.

% First find the path.
path = mfilename('fullpath');
path = [path(1:size(path, 2)-6) 'Matlab2SMT/Matlab2SMT-1.0-SNAPSHOT-jar-with-dependencies.jar'];

% Verify the jar isn't already in the classpath.
classpath = javaclasspath;
exists = 0;
for i=1:size(classpath,1)
    if strcmp(classpath{i}, path) == 1
        exists = 1;
    end
end
if exists == 0
    % Not added yet, thus add it.
    javaaddpath(path);
end


orig_gcbh = gcbh;