Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8179409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:59:38+00:00 2026-06-06T23:59:38+00:00

I need help to connect between Java and MATLAB via MatlabControl . firstly i

  • 0

I need help to connect between Java and MATLAB via MatlabControl .

firstly i wanted to test code in walkthrough but every time i got same exception :

myfunc.m :

function myfunc()
    disp('hello from MYFUNC')
end

Java:

class ShowImage {

 public static void main(String[] args)
        throws MatlabConnectionException, MatlabInvocationException
    {
         // create proxy
         MatlabProxyFactoryOptions options =
            new MatlabProxyFactoryOptions.Builder()
                .setUsePreviouslyControlledSession(true)
                .build();
        MatlabProxyFactory factory = new MatlabProxyFactory(options);
        MatlabProxy proxy = factory.getProxy();

        // call builtin function
        proxy.eval("disp('hello world')");

        // call user-defined function (must be on the path)
        proxy.eval("addpath('E:\\vm')");
        proxy.feval("myfunc");
        proxy.eval("rmpath('E:\\vm)");

        // close connection
        proxy.disconnect();

}}

and here’s exceptions :

Exception in thread "main" matlabcontrol.MatlabConnectionException: Could not launch MATLAB. Command: [matlab, -r, javaaddpath 'C:\Users\walaa\Desktop\matlabcontrol-4.0.0.jar'; matlabcontrol.MatlabClassLoaderHelper.configureClassLoading(); javarmpath 'C:\Users\walaa\Desktop\matlabcontrol-4.0.0.jar'; matlabcontrol.MatlabConnector.connectFromMatlab('PROXY_RECEIVER_42dd44d9-815e-41ad-bec9-e469718b5710', 2100);]
    at matlabcontrol.RemoteMatlabProxyFactory.createProcess(RemoteMatlabProxyFactory.java:305)
    at matlabcontrol.RemoteMatlabProxyFactory.requestProxy(RemoteMatlabProxyFactory.java:116)
    at matlabcontrol.RemoteMatlabProxyFactory.getProxy(RemoteMatlabProxyFactory.java:134)
    at matlabcontrol.MatlabProxyFactory.getProxy(MatlabProxyFactory.java:81)
    at ShowImage.main(ShowImage.java:19)
Caused by: java.io.IOException: Cannot run program "matlab": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at matlabcontrol.RemoteMatlabProxyFactory.createProcess(RemoteMatlabProxyFactory.java:292)
    ... 4 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 6 more

I don’t know what’s the problem, any help will be appreciated!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:59:39+00:00Added an answer on June 6, 2026 at 11:59 pm

    I assume you are using the example from here. Obviously it is tested and working, just make sure that MATLAB is on the Windows path (the error message suggests that it cannot find the program “matlab.exe”)

    screenshot

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help in writing java code that can connect to a remote UNIX
I need connect to server git. http://help.github.com/win-set-up-git/ I do everything to the point, 4
I need help thinking up a design where clients connect and communicate with all
i need some help with socket.listen. my max_connections is set to 1. but even
Quite new to boost and asio, need help: connect to proxy asio::ip::tcp::socket socket_; send
I need help with my php Code which is supposed to update my mysql
i need help to parsing json data to mysql. my code its not work,
Need help, function getFamily() { FB.api('/me/family', function(response) { alert(JSON.stringify(response)); }); } With the above
Need help with a query that I wrote: I have three tables Company id
Need help getting Ember-Data working with Zend Rest. At first, I'm familiar with Zend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.