系统:Win7@Ultimate x86
安装 Matlab 版本:Matlab R2010b
注:问题出现时,在网上搜索了同类问题的解决方案,发现其他系统(如 xp,2000 等)与安装版本(如
R2009b)也出现过类似的问题,但一些中文论坛或问答网上的解决方案都不全,于是写一下自己解决的
过程.
问题①:在下载好 Matlab R2010b 的安装文件(installer)后,双击安装. 首先出现一个小对话框显示安
装程序将 Java 虚拟机拷贝至系统中,接着弹出一个对话框 “Error finding installer class. An
exception occurred while looking for class.”
问题成因:1)Matab 的安装文件夹名包含非 ASCⅡ码(non- ASCⅡ characters)
2)TEMP 或 TMP 系统变量的变量值(指向的目标文件夹)名字包含非 ASCⅡ码
3)Matlab 安装文件损坏
【注】典型的非 ASCⅡ码包含中文与!@#$%^&等符号,具体可以上网搜索“ASCⅡ码表”
或“ASCⅡ code chart”进行对照.
解决方案:1)检查 Matab 安装文件夹名是否包含非 ASCⅡ码,如有则改之,改好后重新安装 Matlab
至名字没问题的目标文件夹中.
2)检查 TEMP 或 TMP 系统变量的指向的目标文件夹名是否包含非 ASCⅡ码,如有则改动文
件夹名字或者直接将变量值改动为名字不含非 ASCⅡ码的新文件夹中. TEMP 与 TMP 变量可以在“环境变
量”对话框中查看与修改,“环境变量”打开方式如下:
xp/2000 系统中,右键“我的电脑”>“属性” >“高级” >“环境变量”
vista/win7 系统中, 右键“计算机”>“属性” >“高级系统设置” >“环境变量”
3)如以上两步确认无误仍无法安装,尝试在安全模式(允许网络活动)中安装 Matlab.
4)如以上三步无碍但仍然无法安装,则安装程序损坏的可能性很大,请更换 Matlab 安装程
序(installer)或者联系 Installation support.
【注意】绝大多数这种 Installer Error 错误在 1)2)两步中都可修复,这里要重点注意第 2)步:
如“系统变量”框左上角显示的 计算机名/用户名(如“XXXX 的用户变量”,此处“XXXX”就是计
算机名)包含中文等非 ASCⅡ码,那么需特别注意 TEMP 与 TMP 的变量值地址;如变量值为
“%USERPROFILE%\AppData\Local\Temp”,则须 ⑴ 改计算机名/用户名为一个不含非
ASCⅡ码的名字, 或者 ⑵ 注册一个名字不含 ASCⅡ码的用户名,然后“切换用户”至新用户再安装
Matlab,或者 ⑶ 改动 TEMP 与 TMP 的变量值为一新文件夹,文件夹名字不含非 ASCⅡ码. 因为对于
用户名为“XXXX”的计算机,其变量值虽然写的是
“%USERPROFILE%\AppData\Local\Temp”,其实际指向却是
“C:\Users\XXXX\AppData\Local\Temp”.
我之前改了好久都没改好,就是用户名包含“广州”两个中文字,但 TEMP 和 TMP 却都显示为符合规则
的“%USERPROFILE%\AppData\Local\Temp”,所以一直找不着问题所在. 后来换了用户名
以后安装一下就成功了.
【附】Mathwork Technical Support 的官方回答
Technical Solutions
Why do I receive an "Error finding installer class" message when trying to
install MATLAB on Windows?
Date Last Modified: Friday, June 26, 2009
Solution ID:
1-3042HP
Product:
MATLAB
Reported in Release:
No Release
Platform:
Windows
Operating System:
Windows Any
Subject:
Why do I receive an "Error finding installer class" message when trying to install MATLAB on
Windows?
Problem Description:
After starting the installation, I receive the following error message:
"Error finding installer class"
Solution:
This error message can occur if one of the following conditions is
true:
- The destination folder for MATLAB contains non-ASCII
characters (ex: !@#$&^?)
- The Windows TEMP and/or TMP variables point to a folder with
non-ASCII characters
- There is a problem with the installation files (corrupt DVD or
incomplete downloads)
As a workaround for this issue, make sure you are installing
MATLAB into a folder with ASCII characters only. If the
destination folder is correct, see below for additional
troubleshooting:
1) Check the Windows TEMP and TMP variables
To confirm the path for TEMP and TMP under Windows XP/2000:
1. Right click on My Computer and choose Properties
2. Choose the Advanced Tab
3. Click on the Environment Variables Button (bottom left)
In Vista this is accomplished by the following:
1. Right click on Computer and choose Properties
2. Click on Advanced Settings on the left side
3. Click continue on the UAC page
4. Click on the Environment Variables Button (bottom)
Check for the TMP and TEMP variables under both System and
User variables. If you see the variable set to a value between
percent signs (ex: %TMP%) or to a path with all ASCII
characters, the variable is fine. Otherwise, if the varilable have
non-ASCII characters such as an exclaimation point (!), these
variables can be modified by double clicking on the variable or
highlighting it and choosing Edit.
Once changed, reboot the machine and retry the installation.
2) Try the installation in Windows Safe mode.
If the installation folder and the TEMP/TMP folders are all ASCII
based, you may be able to resolve this issue by installing MATLAB
in Windows Safe Mode. Safe Mode disables hardware drivers and
may allow the installation to complete. To enter Safe Mode,
reboot the machine. As the machine is booting, tap the F8 key
every few seconds until a menu appears. In the menu, select the
option for: "Safe Mode with Networking". Log in as normal and
try the installation.
3) Try different installation files
If the installer does not work after the workarounds above, the
best option is to try different installation files. These can be from
a different DVD or via downloads from the MathWorks website.
For instructions on how to download, see the related solution:
1-1815H "How do I download licensed MATLAB products from
MathWorks website?"
If you are still unable to install after following these steps,
contact Installation support here:
http://www.mathworks.com/support/contact_us/index.html