public void setEnvVars() { // Load some test program enviroment variables try { CapArea env = capInterface.getArea("Environment"); TSPProperties properties = TSPProperties.instance(); ProgramInitInfo testProgInit = ProgramInitInfo.instance(); String tpFullPath = testProgram.getS("Path"); String[] tpPathEls = tpFullPath.split("\\\\"); String progName = ""; String progVersion = ""; // Added as part of IMS changes for (int i = tpPathEls.length - 1; i >= 0; i--) { CoreTsp.out(tpPathEls[i]); if (tpPathEls[i] != null && !tpPathEls[i].equals("")) { progName = tpPathEls[i]; progVersion = tpPathEls[i - 1]; // Added as part of IMS changes break; } } // Added as part of IMS changes String[] progVersionEls = progVersion.split("_"); String TpVer = progVersionEls[progVersionEls.length - 1]; testProgInit.put("TpName", progName); testProgInit.put("TpPath", tpFullPath); testProgInit.put("TpVersion", TpVer); // Added as part of IMS changes properties.put("TPPath", tpFullPath); properties.put("Program", progName); properties.put("ProgramVersion", TpVer); // Added as part of IMS changes // } env.setS("VariableName", "XTOS_TSPCLASSPATH"); if (env.getB("VariableExists")) { String tspClassPath = env.getS("VariableValue"); String tspPath = tspClassPath.split("classes")[0]; properties.put("TspDir", tspPath); properties.put("TspClassPath", tspClassPath); healthy = true; } else CoreTsp.out("Error: XTOS_TSPCLASSPATH not set"); } catch (Fatal e) { CoreTsp.out("An exception occurred while communicating with XTOS."); e.printStackTrace(); healthy = false; } catch (Basic e) { e.printStackTrace(); healthy = false; } catch (TspRuntimeException e) { CoreTsp.out( "An exception occurred while attempting to " + "retrieve an instance of the the internal properties data structure."); } }