Application Compiler won't start - Java error?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When I try to use Application Compiler on R2016a using Windows 7, I receive the following error messages:
Error using applicationCompiler (line 32)
Java exception occurred:
java.lang.IllegalArgumentException: Expression: platform/windows
at
com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:40)
at
com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:16)
at
com.mathworks.project.impl.plugin.SimpleExpression$1.run(SimpleExpression.java:464)
at
com.mathworks.project.impl.plugin.SimpleExpression$Token.getCompiledXpath(SimpleExpression.java:393)
at
com.mathworks.project.impl.plugin.SimpleExpression$TokenType$2.evaluate(SimpleExpression.java:145)
at
com.mathworks.project.impl.plugin.SimpleExpression.evaluate(SimpleExpression.java:62)
at
com.mathworks.project.impl.plugin.ExpressionBasedTargetAttribute.evaluateString(ExpressionBasedTargetAttribute.java:72)
at
com.mathworks.project.impl.plugin.ExpressionBasedTargetAttribute.evaluateBoolean(ExpressionBasedTargetAttribute.java:66)
at
com.mathworks.project.impl.model.Target.isEnabled(Target.java:536)
at
com.mathworks.toolbox.compiler.model.CompilerTargetFactory.defineTargets(CompilerTargetFactory.java:117)
at
com.mathworks.project.impl.plugin.PluginManager.readTargets(PluginManager.java:273)
at
com.mathworks.project.impl.plugin.PluginManager.getTargets(PluginManager.java:241)
at
com.mathworks.toolbox.compiler.desktop.toolstrip.DeploytoolClientBuilderFactory.forceInit(DeploytoolClientBuilderFactory.java:42)
at
com.mathworks.toolbox.compiler.desktop.toolstrip.DeploytoolClientBuilderFactory.getTargetForKey(DeploytoolClientBuilderFactory.java:126)
at
com.mathworks.toolbox.compiler.desktop.DeploytoolLaunchPad.startStandaloneTool(DeploytoolLaunchPad.java:102)
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:/D:/Program%20Files/MATLAB/R2016a/java/jarext/saxon9-xpath.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2:
Illegal configuration-file syntax
at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
at
com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:36)
... 14 more
Exception in thread "Thread-17" java.lang.IllegalArgumentException: Expression: platform/windows
at com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:40)
at com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:16)
at com.mathworks.project.impl.plugin.SimpleExpression$1.run(SimpleExpression.java:464)
at com.mathworks.project.impl.plugin.SimpleExpression$Token.getCompiledXpath(SimpleExpression.java:393)
at com.mathworks.project.impl.plugin.SimpleExpression$TokenType$2.evaluate(SimpleExpression.java:145)
at com.mathworks.project.impl.plugin.SimpleExpression.evaluate(SimpleExpression.java:62)
at com.mathworks.project.impl.plugin.ExpressionBasedTargetAttribute.evaluateString(ExpressionBasedTargetAttribute.java:72)
at com.mathworks.project.impl.plugin.ExpressionBasedTargetAttribute.evaluateBoolean(ExpressionBasedTargetAttribute.java:66)
at com.mathworks.project.impl.model.Target.isEnabled(Target.java:536)
at com.mathworks.toolbox.compilersdk.model.CompilerSDKTargetFactory.defineTargets(CompilerSDKTargetFactory.java:78)
at com.mathworks.project.impl.plugin.PluginManager.readTargets(PluginManager.java:273)
at com.mathworks.project.impl.plugin.PluginManager.getTargets(PluginManager.java:241)
at com.mathworks.project.impl.plugin.PluginManager.getLicensedTargetEDT(PluginManager.java:334)
at com.mathworks.toolbox.compiler.model.CompilerTargetFactory$1.run(CompilerTargetFactory.java:85)
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:/D:/Program%20Files/MATLAB/R2016a/java/jarext/saxon9-xpath.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2: Illegal configuration-file syntax
at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
at com.mathworks.project.impl.plugin.DefaultXpathEvaluator.compileXPath(DefaultXpathEvaluator.java:36)
... 13 more
Attempted so far: 1)Re-installed latest version of Matlab (R2016a) 2)Checked java version using version -java (1.8) and installed matching JDK 3)Set the JAVA_HOME environment variable to the path of the JDK installation at command line. Still get same error messages. Note that is happens when I simply click on the Application Compiler icon in the Apps tab - it won't even launch.
0 commentaires
Réponse acceptée
Saurabh Gupta
le 19 Sep 2016
Hello Anna,
From your description, it appears that you are using Java 1.8 with MATLAB R2016a. Currently, MATLAB (both R2016a and R2016b) is compatible with JDK 1.7, and using JDK 1.8 can cause unpredictable behavior.
To resolve the issue, you can try installing JDK 1.7 and setting up the JAVA_HOME environment variable accordingly to replace your JDK 1.8 setup. In addition, you can also try setting up the MATLAB_JAVA environment variable before restarting MATLAB. Refer to the attached link for more details.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Java Package Integration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!