Deploy .m (Matlab) to .java and .jar (Java Application) On Windows OS [part 1]
Before doing the Deploy source code *.m Into. Java and. Jar, we first do the following tricks to enable MATLAB JA Builder (Java Application), Recommended minimal use Matlab 2009 :
- Install MCRInstaller.exe
(Take MCRInstaller file in folder :
“C:\Program Files\MATLAB\R2009a\toolbox\compiler\deploy\win32\MCRInstaller.exe”)note: address MCRInstaller file “C:\Program Files\MATLAB\R2009a\toolbox\compiler\deploy\win32\MCRInstaller.exe” may be different with your computer. Because this MCRInstaller file address matches the address of where we install Matlab. So take this MCRInstaller file as it is on your computer.
- Open cmd windows, and then check whether javac (java component) has been active on your computer with the command “javac-version” (without the quotes). If you have not done, then headed step 3.
- Open “Control Panel \ System and Security \ System” (If you are using Windows 7).
- Click “Advanced system setting”, then click “Advanced” tab,
- If you are using Windows XP. Open the “Control Panel”, then click “Performance and Maintenance” and then click “System”, then click the “Advanced” tab.
- Click the “Environment Variables” button.
- Find in the “System variables” that Variable named “Path”.
- Click the “Edit” button.
- Add the following value “;C:\Program Files\Java\jdk1.6.0_16\bin” (without quotation marks) in the Variable value. Then click the “OK” button.
note: value “;C:\Program Files\Java\jdk1.6.0_16\bin” could be different with your computer. Because the address of this value corresponds to the version we install jdk. So take this value According to the address you have in your computer.
note: Notice the text on the part that has a gray background color, the entire contents of the Variable value in the computer we have copy-paste it in Notepad ++, hopefully can be used as a reference. (Fill all the Variable value is only 1 line or 1 line only).
- Check javac version. Close cmd if it is still active, we open cmd windows again, then we type the command “javac-version” (without quotes) will display as shown below.
- Congratulation, javac (java component) has been active on your computer. 🙂
- To be Continue On [part 2]
Posted on October 8, 2012, in Deploy .m to .jar, Deploy .m to .java, Matlab Compiling, Matlab Developer and tagged Java Application, MATLAB, Matlab Deploytool, Matlab for Final Project, Matlab for Research, Matlab Gui. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0