java - How to apply a patch -
I have this patch code that I downloaded from a web article (Calling Mattelback from Java).
But I do not know how to implement this in my computer running WindowsXp, what I'm trying to do is call a matlab script file from Java. I have got the required source code and everything but this mater is holding back. Any help is highly appreciated. Thank you.
There is a patch code here.
Index: MatlabControl.java =================================== =============================== RCS file: /cvsroot/tinyos/tinyos-1.x/tools/java/net /tinyos/matlab/MatlabControl.java.v Revision 1.3 is retrieving diff -u -r1.3 MatlabControl.java --- MatlabControl.java 31 Mar 2004 18: 43:50 -0000 1.3 +++ MatlabControl Java 16th August 2004 20:36:51 -0000 @@-214,7 +214,8 @@ matlab.evalConsoleOutput (order); } And {- matlab.fevalConsoleOutput (order, args, 0, empty); + // matlab.fevalConsoleOutput (command, args, 0, empty); + Matlab.fevalConsoleOutput (command, args); }} Hold (exception e) {System.out.println (e.toString ());
You have to apply that patch to the file. On Unix, you have a standard patch
program to do this, but it is not usually present on Windows.
But seeing the patch file, it is very small and you can easily make changes with the handset View the patch file: the row should be removed with a -
in the left column . Rows to be copied with +
should be added.
Then you should look at MatlabControl.java
and remove this line:
matlab.fevalConsoleOutput (command, args, 0, empty) );
and add these lines:
// matlab.fevalConsoleOutput (command, args, 0, empty); Matlab.fevalConsoleOutput (command, args); In other words, this is a very small and simple change, you have to remove the last two arguments on call
to call method.fevalconsoleOutput () If you want the
patch
command (and many other UNIX utilities) on Windows, you can download and install.
Comments
Post a Comment