deploytool problems and incompatible JVM.

1 次查看(过去 30 天)
hi, change the JVM version of matlab for my computer, I use windows 7, and is installed matlab ml2013a, both 64 bits.
the root of the problem is that I try to deploy an application in java and threw the following error:
3 errors 8 warnings Error: An error occurred while shelling out to javadoc (Error code = 1). Unable to build executable.
such error to me was hard to track, and alleged that I found only solution to the problem was to change the JVM matlab for compatibility with windows. and java version on my computer is:
java version "1.8.0_20" Java (TM) SE Runtime Environment (build 1.8.0_20-b26) Java HotSpot (TM) 64-Bit Server VM (build 25.20-b23, mixed mode).
matlab version is:
1.6.0_17-b04 Java with Sun Microsystems Inc. Java HotSpot (TM) 64-Bit Server VM mixed mode
and now I get the following error in matlab:
>> deploytool
Error using deploytool (line 43)
Java exception occurred:
java.lang.IllegalArgumentException: java.lang.RuntimeException:
XPathFactory#newInstance() failed to create an XPathFactory for the default object
model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException:
javax.xml.xpath.XPathFactoryConfigurationException: java.util.ServiceConfigurationError:
javax.xml.xpath.XPathFactory:
jar:file:/C:/Program%20Files/MATLAB/R2013a/java/jarext/saxon9-xpath.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2:
Illegal configuration-file syntax
at
com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:42)
at
com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:15)
at
com.mathworks.project.impl.plugin.SimpleExpression$1.run(SimpleExpression.java:465)
at
com.mathworks.project.impl.plugin.SimpleExpression$Token.getCompiledXpath(SimpleExpression.java:394)
at
com.mathworks.project.impl.plugin.SimpleExpression$TokenType$2.evaluate(SimpleExpression.java:146)
at
com.mathworks.project.impl.plugin.SimpleExpression.evaluate(SimpleExpression.java:63)
at
com.mathworks.project.impl.plugin.ExpressionBasedTargetAttribute.evaluateString(ExpressionBasedTargetAttribute.java:73)
at
com.mathworks.project.impl.plugin.ExpressionBasedTargetAttribute.evaluateBoolean(ExpressionBasedTargetAttribute.java:67)
at com.mathworks.project.impl.model.Target.isEnabled(Target.java:276)
at
com.mathworks.project.impl.plugin.PluginManager.readTargets(PluginManager.java:590)
at
com.mathworks.project.impl.plugin.PluginManager.getTargets(PluginManager.java:232)
at
com.mathworks.project.impl.plugin.PluginManager.getLicensedTargets(PluginManager.java:264)
at
com.mathworks.project.impl.plugin.PluginManager.getLicensedTargetsEDT(PluginManager.java:259)
at com.mathworks.project.impl.NewOrOpenDialog.invoke(NewOrOpenDialog.java:504)
at com.mathworks.project.impl.NewOrOpenDialog.invoke(NewOrOpenDialog.java:489)
at com.mathworks.project.impl.NewOrOpenDialog.invoke(NewOrOpenDialog.java:482)
at
com.mathworks.toolbox.compiler.plugin.DeploytoolCommandLineParser.startDeploytoolGUI(DeploytoolCommandLineParser.java:138)
at
com.mathworks.toolbox.compiler.plugin.DeploytoolCommandLineParser.parse(DeploytoolCommandLineParser.java:66)
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an
XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the
XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException:
java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory:
jar:file:/C:/Program%20Files/MATLAB/R2013a/java/jarext/saxon9-xpath.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2:
Illegal configuration-file syntax
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:102)
at
com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:38)
... 17 more
>>
por favor si alguien me puede ayudar le estaré enormemente agradecido.

回答(1 个)

kevin jessid figueroa
hi, I solved the problem by installing the compiled java on my computer version, the build process of deploytool worked great. I leave the link here in case anyone is presented with the same problem: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
  3 个评论
Noam Greenboim
Noam Greenboim 2016-6-21
Thanks Kevin, I had the same problem and used the same solution to solve it. Just need to make sure to erase the environment variable (i'm using Windows 7) that points to Java - called "MATLAB_Java".
Noam Greenboim
Noam Greenboim 2016-6-22
Here's the answer received from Mathworks support:
_This is because the customer is using Java 1.8.0_92-b14 rather than Java 1.7.0_60-b19 which is shipped with MATLAB. In order to avoid the Java exception, please use the Java version shipped with MATLAB. Please follow the link given below to change the JVM to Java 1.7.0_60-b19. http://www.mathworks.com/matlabcentral/answers/130359-how-do-i-change-the-java-virtual-machine-jvm-that-matlab-is-using-on-windows_
Customer should be able to run the "deploytool" application by using Java 1.7.0_60-b19.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Java Package Integration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by