#! /bin/bash

#
# Script name: mach_data_checking
#
# Purpose: GUI to allow users to attempt retrieving Mach results without
# having to go through the database.
#
# Usage:
#    mach_data_checking
#
# History:
#    08/27/20 - Rob Janes - Initial release

# Class path for all the Mach applications.
MACH_BASE=/usr/local/share/mach
export CLASSPATH=$MACH_BASE/jars/mach_corba.jar\
:$MACH_BASE/jars/mach_infrastructure.jar\
:$MACH_BASE/jars/mach_cyflex.jar\
:$MACH_BASE/jars/i18nlog.jar\
:$MACH_BASE/jars/bundles.jar\
:$MACH_BASE/jars/jacorb/jacorb-3.9.jar\
:$MACH_BASE/jars/jacorb/jacorb-omgapi-3.9.jar\
:$MACH_BASE/jars/jacorb/slf4j-api-1.7.14.jar\
:$MACH_BASE/jars/jacorb/slf4j-jdk14-1.7.14.jar\
:$MACH_BASE/jars/jacorb/jboss-rmi-api_1.0_spec-1.0.6.Final.jar\
:$MACH_BASE/jide-common.jar\
:$MACH_BASE/jide-grids.jar\
:/cyflex/specfilegui/specfilegui.jar\
:/cyflex/specfilegui/facade.jar\
:/cyflex/specfilegui.3rdparty/protobuf-2.3.0.jar

# Insure Java 17 is the version of Java used to run this application
export JAVA_HOME=$MACH_BASE/java_17
PATH=$JAVA_HOME/bin:$PATH
LD_LIBRARY_PATH=$JAVA_HOME/lib:$LD_LIBRARY_PATH

chrt -o 0 java \
 -Dmach_properties=$MACH_BASE/data/mach_data_checking.txt \
 -DPropertiesFile=/cell/cui_properties.txt \
 com.cmx.mach.prog.mach_data_checking &
