Question: Please keep in mind that I know nothing about Matlab.

Matlab Builder JA lets developer build Matlab applications and export them into Java jars. That's great, I just have to produce a jar and I can then use it from other java code.

Does anyone know how much the single jar packaging module cost?

Is there any free version or similar freeware product?

Is there any other way to achieve the same thing -Using Java to pass inputs to Matlab and getting an output back without worrying about anything else- with standard Matlab/Java?

Answer: 
The Matlab JA Builder (also referred to as the Matlab JA Compiler) runs about $5k, but for the deployment to actually work you also need to get the MCR Toolbox, which is about $4k. This is of course on top of an existing Matlab installation which will run you about $2k. So for about $11k you can have a fully armed and operation workstation that converts .M file functions to a compressed .jar file that can be used in an arbitrary Java application. The cool thing is that these license fees give you a site license for DEPLOYMENT... meaning it is free to deploy any .jar file produced by this setup at the site that pays for the licenses to any target machine. The target machines do NOT need matlab installed. OS support exists for Win/Mac/Linux/Solaris last I checked.

However be advised that the license structure is for one site and for one development machine. You want two developers working simultaneously? double the costs. You want to deploy the same app to multiple sites... double the costs. call Mathworks they're very happy to tell you precisely what you need and don't need and you'll probably talk to an engineer and not some call center drone. I did all this at a previous job in 2009.
MATLAB Builder JA for Java is currently £3,150 for an individual commercial license, and requires MATLAB Compiler, which is currently £3,850 for an individual commercial license. I'm in the UK so can't get pricing in other currencies, but you can get your local prices from the following links.

[Pricing for MATLAB Builder JA](http://www.mathworks.com/products/javabuilder/pricing_licensing.html)

[Pricing for MATLAB Compiler](http://www.mathworks.com/products/compiler/pricing_licensing.html)

Contrary to Birdasaur's answer, the products (and the deployed components) are not supported on Solaris - MATLAB itself has not been supported on Solaris [since R2010a](http://www.mathworks.com/support/sysreq/roadmap.html). You can also deploy the generated .jar files to as many sites as you like. Individual licenses can be either assigned to a named individual, in which case only that developer can use the product; or to a specific machine, in which case any developer can use it as long as they are at the console of the machine (not remotely logged in).

MATLAB also has an undocumented interface called JMI (Java MATLAB interface) that you can use to call MATLAB directly from Java. Take a look at [matlabcontrol](http://code.google.com/p/matlabcontrol/). However, this requires a live copy of MATLAB for the deployed application.