com.mathwo​rks.util.S​hutdownRun​timeExcept​ion error

2 次查看(过去 30 天)
In the past few days I've been getting this message when a job is completed and MATLAB tries to shut down:
com.mathworks.util.ShutdownRuntimeException: Java is shutting down
at com.mathworks.services.Prefs.nativeGetPreferencesDirectory(Native Method)
at com.mathworks.services.Prefs.getPropertyDirectory(Prefs.java:198)
at com.mathworks.services.binding.MatlabKeyBindingPreferenceUtils.resolveToPrefDir(MatlabKeyBindingPreferenceUtils.java:112)
at com.mathworks.services.binding.MatlabKeyBindingPreferences.getModifiedDefaultFile(MatlabKeyBindingPreferences.java:213)
at com.mathworks.services.binding.MatlabKeyBindingPreferences.resolveModifiedDefaultFilesFromPrefs(MatlabKeyBindingPreferences.java:116)
at com.mathworks.services.binding.MatlabKeyBindings.initializeFromPrefs(MatlabKeyBindings.java:717)
at com.mathworks.services.binding.MatlabKeyBindings.<clinit>(MatlabKeyBindings.java:590)
at com.mathworks.widgets.debug.DebuggerManager$ActionShell.<init>(DebuggerManager.java:194)
at com.mathworks.widgets.debug.DebuggerManager$ActionShell.<init>(DebuggerManager.java:190)
at com.mathworks.widgets.debug.DebuggerManager$DebuggerShellActions$1.<init>(DebuggerManager.java:97)
at com.mathworks.widgets.debug.DebuggerManager$DebuggerShellActions.<clinit>(DebuggerManager.java:97)
at com.mathworks.widgets.debug.DebuggerManager.getContinueAction(DebuggerManager.java:292)
at com.mathworks.matlabserver.worker.service.breakpoint.impl13b.DebuggerInstaller.<init>(DebuggerInstaller.java:46)
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.Class.newInstance(Unknown Source)
at com.mathworks.matlabserver.a.b.R(Unknown Source)
at com.mathworks.matlabserver.a.b.<init>(Unknown Source)
at com.mathworks.matlabserver.a.b.<init>(Unknown Source)
at com.mathworks.matlabserver.a.f.initialized(Unknown Source)
at com.mathworks.matlabserver.connectorcommon.b.b.run(Unknown Source)
at com.mathworks.matlabserver.connectorcommon.util.g.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I have no idea what this means, so I would very much appreciate your help. Thanks!
  2 个评论
Larry Oolman
Larry Oolman 2015-10-15
I was having the same issue with batch programs that use -nodisplay with R2015b under Redhat Linux 6.6. I believe a race condition occurs between matlab and the java subsystem if you call quit or exit. I was able eliminate the error messages by creating a finish.m file somewhere on my javapath with the two lines:
import java.lang.System
java.lang.System.exit(0)
The error can be replicated by repeated running from the Linux command line:
matlab -nodisplay << EOF
exit
EOF
Sascha F
Sascha F 2017-1-25
编辑:Sascha F 2017-1-25
Hey, I am having the same problem while executing a bash script that calls matlab programs which in turn call the "quit" function. What exactly do you mean by "java path"?

请先登录,再进行评论。

回答(1 个)

Tim Darrah
Tim Darrah 2022-8-15
Old question, but in case anyone ever stumbles upon this. I had this error when calling
exit();
What should be called is
exit;
  1 个评论
Walter Roberson
Walter Roberson 2022-8-16
编辑:Walter Roberson 2022-8-16
The times that I have used exit(), it has always worked for me. exit is documented as being the same a quit which is a function (it can take optional arguments.)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by