Results 1 to 4 of 4
- 06-14-2007, 05:56 PM #1
Senior Member
- Join Date
- Jun 2007
- Posts
- 130
- Rep Power
- 0
java.io.IOException: CreateProcess: matlab error=2
I'm using matlab it is call by a class what its name is "Engine"
I'm working in linux and works fine, I want to know how can I do that with windows.
I found on Internet a class call MatlabControl, that uses all .jar of matlab.
But it gives to me problems when I try to create a matlab object
And this is the exception:Java Code:try { Process p = Runtime.getRuntime().exec("matlab"); } catch (IOException ex) { ex.printStackTrace(); }
Can you help me?Java Code:java.io.IOException: CreateProcess: matlab error=2 at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) at java.lang.ProcessImpl.start(ProcessImpl.java:30) at java.lang.ProcessBuilder.start(ProcessBuilder.java:451) at java.lang.Runtime.exec(Runtime.java:591) at java.lang.Runtime.exec(Runtime.java:429) at java.lang.Runtime.exec(Runtime.java:326) at matlab.Main.main(Main.java:32)Last edited by Jack; 06-30-2007 at 01:39 AM.
- 06-25-2007, 08:33 PM #2
Member
- Join Date
- Jun 2007
- Posts
- 1
- Rep Power
- 0
solution from java world
CreateProcess error=2, trying to open xml file
When Runtime.exec() won't - Java World
try {
String[] cmd = new String[4];
cmd[0] = "cmd.exe";
cmd[1] = "/C";
cmd[2] = "start";
cmd[3] = "D:\\examples\\invoices\\2-1-20070625061706-ABC.xls";
// cmd[3] = "will.xls";
// cmd[3] = "mailto:";
// cmd[3] = "a.html";
// cmd[3] = "file:/c:/java/temp/a.html";
Process process = Runtime.getRuntime().exec( cmd );
} catch (IOException e) {
e.printStackTrace();
}
- 06-30-2007, 01:39 AM #3
Senior Member
- Join Date
- Jun 2007
- Posts
- 130
- Rep Power
- 0
it works!!!
thanks pgandle!
- 04-10-2008, 09:01 AM #4
Member
- Join Date
- Apr 2008
- Location
- India
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
error with import java.io.*
By osval in forum New To JavaReplies: 5Last Post: 05-13-2010, 05:03 PM -
Help, Integrate a Java with Matlab
By toby in forum Advanced JavaReplies: 2Last Post: 08-07-2008, 07:08 AM -
I need to be able to deal with functions like matlab
By romina in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:37 AM -
java.io.IOException: invalid header field
By osval in forum Advanced JavaReplies: 1Last Post: 08-06-2007, 11:09 PM -
Variable passing, Error: IOException
By fernando in forum New To JavaReplies: 3Last Post: 07-31-2007, 02:03 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks