There is a Java library inspired by the class MatlabControl called matlabcontrol which can do everything that class can do and far more. To get started, take a look at the walkthrough.
In addition to the solutions mentioned by rohit leeta, there is another more recent solution called matlabcontrol which can be easily used to call MATLAB from Java. To get started, take a look at the walkthrough.
An easier way than using Runtime.exec() is to make use of the matlabcontrol Java library. You can use feval to directly call MATLAB functions and provide any number of arguments directly. To get started, take a look at the walkthrough.
matlabcontrol will allow you to easily call MATLAB from Java. It's just like using eval and feval in MATLAB's Command Window and the results can be returned to Java. To get started, take a look at the walkthrough.