Java error on Linux

Hello,

I got this java error when trying to use a homemade process (the process works well without GUI):

No method 'setText' with matching signature found for class 'javax.swing.JLabel'.

Error in gui_component (line 193)
    jComp.setText(compText);

Error in panel_process_select>CreatePanel/UpdateProcessOptions (line 973)
                    gui_component('label', jPanelOpt, [], ['<HTML>', option.Comment]);

Error in panel_process_select>CreatePanel/UpdatePipeline (line 697)
        UpdateProcessOptions();

Error in panel_process_select>CreatePanel/AddProcess (line 596)
        UpdatePipeline(iNewProc);

Error in panel_process_select>@(h,ev)AddProcess(iProc,AddMode) (line 445)
                    java_setcb(jMenusAll(iProc), 'ActionPerformedCallback',  @(h,ev)AddProcess(iProc,
                    AddMode));

I'm using Debian 10 buster, MATLAB 2017b, Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode.
Previously I set webutils.htmlrenderer('basic') in MATLAB to avoid a JxBrowser error when using SPM.

Many thanks!

Best,
Shuai

Hi Shuai,

The most likely cause of your error is that one of your process options (specifically, one of type "value") is not formatted in the expected way. Make sure it has a Comment field with a string value (single quotes). Is it possible for you to share the process with us? It will help us find the error.

Best,
Martin

Hi Martin,

Thanks a lot for your prompt reply. Here is the process file. process_evt_detect_seeg_es.m (7.4 KB)

Best,
Shuai

Indeed, if you remove the curly braces { } from the Comment field of your threshold parameters in GetDescription(), it fixes the problem:

% Threshold1 - SDs from the average amplitude
sProcess.options.threshold1.Comment = 'x SDs from the Mean: ';
sProcess.options.threshold1.Type    = 'value';
sProcess.options.threshold1.Value   = {5, 'SDs', 0};
% Threshold2 - absolute upper limit
sProcess.options.threshold2.Comment = 'The upper limit of peak amplitude (abs.): ';
sProcess.options.threshold2.Type    = 'value';
sProcess.options.threshold2.Value   = {350, 'uV', []};    
% Threshold3 - variation between consecutive time points
sProcess.options.threshold3.Comment = 'The threshold of variation between consecutive points (abs.): ';
sProcess.options.threshold3.Type    = 'value';
sProcess.options.threshold3.Value   = {25, 'uV', []};     

Best,
Martin

It fixes the problem. Thank you very much! :grinning:
image

Best,
Shuai

1 Like