matlabcontrol is a Java API that allows for calling MATLAB from Java. You can eval, feval, as well as get and set variables. Interaction can be performed from either inside MATLAB or outside MATLAB.
The basic usage pattern with matlabcontrol is to create a factory, and then to create a proxy. The proxy is used to communicate with MATLAB.