(noob) Matlab Compiler Issue
1 次查看(过去 30 天)
显示 更早的评论
Hey folks,
I am trying to build an m-file (sans GUI) into a standalone application for colleagues to utilize.
Unfortunately, the compiler immediately exits in error when I hit Package. here is the packagingLog:
ant:
<ant>
<mkdir dir="C:\Users\hb69954\Documents\MATLAB\kairos\SugaredOwl\for_redistribution" />
<mkdir dir="C:\Users\hb69954\Documents\MATLAB\kairos\SugaredOwl\for_testing" />
<mkdir dir="C:\Users\hb69954\Documents\MATLAB\kairos\SugaredOwl\for_redistribution_files_only" />
</ant>
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Project
at com.mathworks.project.impl.engine.AntEntryPoint.main(AntEntryPoint.java:21)
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Project
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
My assumption here is I am missing a java library, could anyone point me in the right direction?
0 个评论
采纳的回答
Gitesh Nandre
2015-6-22
编辑:Gitesh Nandre
2015-6-22
The "NoClassDefFoundError" error is thrown because MATLAB is not able to locate Java Runtime libraries that are used by the MATLAB Compiler SDK.
There are several possible causes to this issue:
A. The installation is corrupted and there are .jar files missing from the MATLAB installation folder.
B. The classpath.txt file is missing references to Java Runtime libraries.
1. To take a look at the MATLAB search path, execute "pathtool" in the Command Window. This will open up the Set Path window with the list of folders that MATLAB parses. The start-up folder should be at the top.
You can try to restore the search path to the installation default by executing the following commands:
>> restoredefaultpath
>> rehash toolboxcache
However, this will not remove the start-up directory from the MATLAB search path. If the start-up folder contains M-files, try to remove them or move them to another folder which is not on the search path.
2. If the issue still persists, the installation might be corrupted. Remove MATLAB completely and install it again to resolve the issue.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!