I'm encountering an error while developing a Java-based software using Scilab. Below, I've outlined the details of the problem:
Startup Execution: When attempting to execute the file /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/builder.sce, the startup process loads the initial environment.
Building Process: During the execution, the following steps are taken in the building process:
Macros are being built, resulting in the creation of [spacecraft_gnc_tbxlib] (Macros). Files related to the Kalman Filter (Kalman_Filter_IF.sci, Kalman_Filter_SIM.sci, Kalman_Filter_Utils.sci) are processed. Blocks are being built. Help documents are being generated, including the master document located at /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/en_US. The manual file [javaHelp] is being built in the specified directory. Error Message: An error occurs during the building process at line 693 of the xmltoformat function, which is called from xmltojar and subsequently from tbx_build_help. The error trace indicates that the issue originates from a function call in the file builder_help.sce.
Suggested Solution: The error message suggests that setting two environment variables (SCI_DISABLE_TK=1 and SCI_JAVA_ENABLE_HEADLESS=1) might resolve the issue, especially if Scilab is started in a chroot environment.
Request for Assistance: Given the error message and the suggested solution involving environment variables, I seek guidance on how to properly set these environment variables in my Scilab development environment. Any insights or step-by-step instructions would be greatly appreciated.
Part 1 code is this for builder.sce file
{.
mode(-1);
lines(0);
function main_builder()
TOOLBOX_NAME = "spacecraft_gnc_tbx";
TOOLBOX_TITLE = "Spacecraft GNC Toolbox";
toolbox_dir = get_absolute_file_path("builder.sce");
// Check Scilab's version
//
// check minimal version (xcosPal required)
if ~isdef("xcosPal") then
// and xcos features required
error(gettext("Scilab 5.3.2 or more is required."));
end
// Check modules_manager module availability
if ~isdef("tbx_build_loader") then
error(msprintf(gettext("%s module not installed."),
"modules_manager"));
end
if ~isdir(toolbox_dir+filesep()+"images"+filesep()+"h5")
[status, msg] =
mkdir(toolbox_dir+filesep()+"images"+filesep()+"h5");
if and(status <> [1 2])
error(msg);
end
end
// Action
//
tbx_builder_macros(toolbox_dir);
tbx_builder_help(toolbox_dir);
tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
endfunction
if with_module("xcos") then
main_builder();
clear main_builder; // remove main_builder on stack
end
´´´
.}
**2-Error part is**
Startup execution:
loading initial environment
--> exec('/Users/vimalchawda/Desktop/spacecraft-gnc-tbx/builder.sce',-1)
Building macros...
-- Creation of [spacecraft_gnc_tbxlib] (Macros) --
genlib: Processing file: Kalman_Filter_IF.sci
genlib: Processing file: Kalman_Filter_SIM.sci
genlib: Processing file: Kalman_Filter_Utils.sci
Building blocks...
Building help...
Building the master document:
/Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/en_US
Building the manual file [javaHelp] in /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/en_US.
at line 693 of function xmltoformat ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/helptools/macros/xmltoformat.sci line 710 )
at line 17 of function xmltojar ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/helptools/macros/xmltojar.sci line 29 )
at line 51 of function tbx_build_help ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_build_help.sci line 67 )
at line 4 of executed file /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/en_US/build_help.sce
at line 13 of function tbx_builder ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_builder.sci line 26 )
at line 49 of function tbx_builder_help_lang ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_builder_help_lang.sci line 64 )
at line 4 of executed file /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/builder_help.sce
at line 71 of function tbx_builder_help ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_builder_help.sci line 87 )
at line 35 of function main_builder ( /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/builder.sce line 45 )
at line 51 of executed file /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/builder.sce
If Scilab is started in a chroot, you might want to try to set the two environment variables: SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
**3- QUESTION : How can I set environment ?**
I am just student and I dont how to deal with such error. Is anyone have any knowledge about it? Thank you
Debugging the development of java problem while running the software. **I can provide you all file or code if any expert is available**
Sorry if I made mistake here by posting this questions.