Commit 7893aed4 authored by ferpasri's avatar ferpasri
Browse files

update linux cmd for analysis service

parent a4af1880
......@@ -50,7 +50,13 @@ public class AnalysisService implements IAnalysisService{
public Void analysis(String orientDBname, String key, String referer) throws Exception {
List<String> commands = new ArrayList<>();
// Prepare linux or windows testar launchment
String launchCommand = "./testar";
if(System.getProperty("").toLowerCase().contains("windows")) {
launchCommand = "testar.bat";
// TESTAR Report Mode is used to start the web service that allows remote State Model Analysis
// testar ShowVisualSettingsDialogOnStartup=false Mode=Analysis DataStoreType=remote DataStoreServer= DataStoreDB=testar DataStoreUser=testar DataStorePassword=testar
......@@ -73,7 +79,11 @@ public class AnalysisService implements IAnalysisService{
cmdToExecute.append(string + " ");
ProcessBuilder builder = new ProcessBuilder("cmd.exe", "/c", cmdToExecute.toString());
// Prepare process execution for linux or windows
ProcessBuilder builder = new ProcessBuilder("/bin/sh", "-c", cmdToExecute.toString());
if(System.getProperty("").toLowerCase().contains("windows")) {
builder = new ProcessBuilder("cmd.exe", "/c", cmdToExecute.toString());
Process p = builder.start();
StringBuilder executionOutput = new StringBuilder("");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment