由于 java.lang.NoClassDefFoundError 导致无法安装 Matlab

由于 java.lang.NoClassDefFoundError 导致无法安装 Matlab

因此,每当我尝试安装 Matlab 时,第一个图像都会出现,但随后就会消失,然后就结束了。这就是我的做法-

user@host$> cd ~/mathworks_downloads
user@host$> unzip matlab_R2012a_student_glnx86_installer.zip
user@host$> ./install

Matlab 徽标和图像会在这里弹出几秒钟,然后消失。这是我收到的输出-

Could not find JRE for glnxa64.  Trying glnx86.
Preparing installation files ...
Installing ...
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Component
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at $Proxy11.<clinit>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
    at com.google.inject.internal.ConstructionContext.createProxy(ConstructionContext.java:81)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:70)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
    at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
    at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
    at com.google.inject.Scopes$1$1.get(Scopes.java:54)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754)
    at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
    at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:95)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
    at com.google.inject.Scopes$1$1.get(Scopes.java:54)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
    at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
    at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
    at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
    at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
    at com.google.inject.Scopes$1$1.get(Scopes.java:54)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754)
    at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
    at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:95)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
    at com.google.inject.Scopes$1$1.get(Scopes.java:54)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
    at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
    at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
    at com.google.inject.Scopes$1$1.get(Scopes.java:54)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:793)
    at com.mathworks.wizard.WizardLauncher.startWizard(WizardLauncher.java:160)
    at com.mathworks.wizard.WizardLauncher.start(WizardLauncher.java:75)
    at com.mathworks.wizard.AbstractLauncher.launch(AbstractLauncher.java:27)
    at com.mathworks.wizard.AbstractLauncher.launchStandalone(AbstractLauncher.java:18)
    at com.mathworks.studentinstaller.Launcher.main(Launcher.java:23)
Finished

之后什么都没发生,尽管显然应该打开一个 Matlab 窗口。这是由于我运行的是 OpenJKD 7 而不是 JRE 7u7 而导致的问题吗?

答案1

尝试官方的 Oracle Java,或者通常会有一个与安装光盘捆绑的 JVM。

您可以从以下位置获取 Oracle Javahttp://www.Java.com(我不相信它还在合作伙伴的仓库中[需要引用])。

旧版 Sun JVM 随安装程序捆绑提供,并且脚本正在尝试使用它,但您可以尝试单独安装它。我会给您更多说明,但只是猜测:可能将其复制到/opt

相关内容