1function viewerJar = lineViewerGetPath
2% VIEWERJAR = LINEVIEWERGETPATH
4% Copyright (c) 2012-2026, Imperial College London
7% Get path to line-viewer.jar in common folder
8% This function
is at dev/src/solvers/JMT/lineViewerGetPath.m
9% Navigate up to the line-dev.git root directory
10current_dir = fileparts(mfilename(
'fullpath')); % dev/src/solvers/JMT
11root_dir = fileparts(fileparts(fileparts(fileparts(current_dir)))); % line-dev.git
12common_dir = fullfile(root_dir,
'common');
13viewerJar = fullfile(common_dir,
'line-viewer.jar');
15if ~exist(viewerJar,
'file')
16 line_error(mfilename, sprintf('line-viewer.jar not found at %s. Please build it and place it in the common folder.', viewerJar));