Diff of /blockproc/blockprocinit.m [6bc853] .. [8d7bed]  Maximize  Restore

Switch to unified view

a/blockproc/blockprocinit.m b/blockproc/blockprocinit.m
1
status=1;
1
status=1;
2
2
3
% Add entry to the dynamic classpath if JVM is present.
3
% Add entry to the dynamic classpath if JVM is present.
4
if ~isempty(which('javaaddpath')) 
4
if ~isempty(which('javaaddpath')) 
5
   try
5
   try
6
      % Here it gets somewhat confusing. This script is called in
7
      % ltfatstart, but the jar is created in ltfatmex. It prints nasty
8
      % warning, if it cannot find the jar. Adding a folder to the classpath,
9
      % which is then filled with compiled classes by ltfatmex is fine. 
10
      %
11
      % Moreover, according to the Matlab documentation:
12
      %
13
      % MATLAB calls the 'clear java' command whenever you change the dynamic path. 
14
      % It clears definition of all Java classes defined by files on the dynamic class path,
15
      % removes all variables from the base workspace, and removes all compiled scripts, functions,
16
      % and MEX-functions from memory.
17
18
      jarFile = 'blockproc.jar';
19
      jarPath = [basepath,filesep,'blockproc',filesep,'java',filesep,jarFile];
20
      if exist(jarPath,'file')
21
         % Adding a jar file. Once added to the classpath, it cannot be
22
         % deleted. Removing it from the classpath issues again the 'clear
23
         % java' command.
24
         javaaddpath([basepath,filesep,'blockproc',filesep,'java',filesep,jarFile]);
25
      else
26
         % Adding directory with *.class files. Does not block.
6
      javaaddpath([basepath,filesep,'blockproc',filesep,'java',filesep]);
27
         javaaddpath([basepath,filesep,'blockproc',filesep,'java',filesep]);
28
      end
7
   catch 
29
   catch 
8
       % Use lasterr for Octave compatibility
30
       % Use lasterr for Octave compatibility
9
       err=lasterr;
31
       err=lasterr;
10
       if ltfatstartprint
32
       if ltfatstartprint
11
           warning('%s: JVM support not present.',upper(mfilename));
33
           warning('%s: JVM support not present.',upper(mfilename));

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks