+3  A: 

My guess is that MATLAB requires you to access it from exactly one thread. You say it works in a single threaded application, perhaps you need to start a dedicated thread for interacting with MATLAB to get this to work correctly.

See also
http://stackoverflow.com/questions/248421/thread-safety-of-matlab-engine-api

Adam Goode
If this is the case, How do I start a dedicated thread in java?
HH
Well, it depends on the specifics of how you interface with MATLAB. Can you give an example of the Java code you use to call your jar? You probably want to create a thread before you call into your jar at all.
Adam Goode
`new Thread(...).start()`
Stephen C
A good book for this is Java Concurrency in Practice. Or look at http://java.sun.com/javase/6/docs/api/java/util/concurrent/package-summary.html
Adam Goode