@@ -45,6 +45,7 @@ void MuRunner()
4545 boolean loop = true ;
4646 while (loop )
4747 {
48+ @ SuppressWarnings ("resource" )
4849 Scanner scan = new Scanner (System .in );
4950 //Get the path to the jar file from the user
5051 System .out .println ("What is the ABSOLUTE path to the .jar file?" );
@@ -71,7 +72,7 @@ void MuRunner()
7172 */
7273 private void MuCommand () throws IOException
7374 {
74- if (System .getProperty ("os.name" ).matches ("Mac OS X" ))
75+ if (System .getProperty ("os.name" ).matches ("Mac OS X" ) && makeConfig () )
7576 macMuCommand (path , jarPath );
7677 else
7778 winMuCommand (path , jarPath );
@@ -102,7 +103,7 @@ private boolean makeConfig()
102103 {
103104 String output = "MuJava_HOME=" + path + "\n Debug_mode=false\n " ;
104105 try {
105- Writer w = new BufferedWriter (new OutputStreamWriter (new FileOutputStream ("mujava.config" ), "utf-8" ));
106+ Writer w = new BufferedWriter (new OutputStreamWriter (new FileOutputStream (path + "mujava.config" ), "utf-8" ));
106107 w .write (output );
107108 w .close ();
108109 return true ;
@@ -177,7 +178,7 @@ private void macMuCommand(String muPath, String jarPath) throws IOException
177178 String [] exec = new String [2 ];
178179 exec [0 ] = "java mujava.gui.GenMutantsMain" ; //Start MuJava GUI for generating mutants.
179180 exec [1 ] = "java mujava.gui.RunTestMain" ; //Start MuJava GUI for running mutant tests options.
180- Execute .getExecute ().exec (exec );
181+ // Execute.getExecute().exec(exec);
181182 }
182183
183184 /**
@@ -190,6 +191,6 @@ private void winMuCommand(String muPath, String jarPath)
190191 String [] exec = new String [2 ];
191192 exec [0 ] = "java mujava.gui.GenMutantsMain" ; //Start MuJava GUI for generating mutants.
192193 exec [1 ] = "java mujava.gui.RunTestMain" ; //Start MuJava GUI for running mutant tests options.
193- Execute .getExecute ().exec (exec );
194+ // Execute.getExecute().exec(exec);
194195 }
195196}
0 commit comments