java - javaoctave jar file has failed in Mac OSX Eclipse -
hi using eclipse kepler java project.
i wanted use octave (the open sourced matlab) calculation. therefore have tried use javaoctave (https://kenai.com/projects/javaoctave) me calculation in java. however, when want compile code following error:
exception in thread "main" dk.ange.octave.exception.octaveioexception: java.io.ioexception: cannot run program "octave": error=2, no such file or directory @ dk.ange.octave.exec.octaveexec.<init>(octaveexec.java:102) @ dk.ange.octave.octaveengine.<init>(octaveengine.java:65) @ dk.ange.octave.octaveenginefactory.getscriptengine(octaveenginefactory.java:49) @ learn.capabilitylearner.connectoctave(capabilitylearner.java:72) @ learn.capabilitylearner.connect(capabilitylearner.java:37) @ learn.capabilitylearner.<init>(capabilitylearner.java:24) @ learn.capability.capabilitymeanvarianceequation.<init>(capabilitymeanvarianceequation.java:10) @ parse.basketball.runner.getplayerfrequency.learnsynergygraph(getplayerfrequency.java:102) @ parse.basketball.runner.getplayerfrequency.main(getplayerfrequency.java:94) caused by: java.io.ioexception: cannot run program "octave": error=2, no such file or directory @ java.lang.processbuilder.processexception(processbuilder.java:478) @ java.lang.processbuilder.start(processbuilder.java:457) @ java.lang.runtime.exec(runtime.java:593) @ dk.ange.octave.exec.octaveexec.<init>(octaveexec.java:100) ... 8 more caused by: java.io.ioexception: error=2, no such file or directory @ java.lang.unixprocess.forkandexec(native method) @ java.lang.unixprocess.<init>(unixprocess.java:53) @ java.lang.processimpl.start(processimpl.java:91) @ java.lang.processbuilder.start(processbuilder.java:452) ... 10 more
this java project has been run on windows machine eclipse kepler think not code have contains error. wiki has mentioned error , explanation given. however, due lack of experience programming not have grasped meaning of solutions. can me identify problem , teach me how shall fix this?
with many ! :)
ps : .classpath of project followed:
<?xml version="1.0" encoding="utf-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="lib" path="matlabcontrol-4.0.0.jar"/> <classpathentry kind="lib" path="javaoctave-0.6.4.jar" sourcepath="javaoctave-0.6.4.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.jre_container"/> <classpathentry kind="lib" path="commons-math-2.2.jar"/> <classpathentry kind="lib" path="commons-logging-1.1.3.jar"/> <classpathentry kind="output" path="bin"/> </classpath>
you can solve problem setting factory
octaveenginefactory factory = new octaveenginefactory(); factory.setoctaveprogram(new file("path_to_octave_executable")); octaveengine octave = factory.getscriptengine();
bgcode
Comments
Post a Comment