matlab与java混合编程报错
Exceptioninthread"main"java.lang.ExceptionInInitializerErroratcom.mathworks.toolbox.j...
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getMCRRoot(MCRConfiguration.java:77)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ModuleDir.<clinit>(MCRConfiguration.java:51)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getModuleDir(MCRConfiguration.java:56)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1447)
at java4.Java4MCRFactory.<clinit>(Java4MCRFactory.java:99)
at java4.Java4.<init>(Java4.java:61)
at test.test3.main(test3.java:14)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.get(MCRConfiguration.java:70)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.<clinit>(MCRConfiguration.java:72)
... 7 more
我按照步骤操作了,而且试了许多不同的程序,都报错,这是什么原因? 展开
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getMCRRoot(MCRConfiguration.java:77)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ModuleDir.<clinit>(MCRConfiguration.java:51)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getModuleDir(MCRConfiguration.java:56)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1447)
at java4.Java4MCRFactory.<clinit>(Java4MCRFactory.java:99)
at java4.Java4.<init>(Java4.java:61)
at test.test3.main(test3.java:14)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.get(MCRConfiguration.java:70)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.<clinit>(MCRConfiguration.java:72)
... 7 more
我按照步骤操作了,而且试了许多不同的程序,都报错,这是什么原因? 展开
2015-06-19
展开全部
StringIndexOutOfBoundsException: 这个是字符串操作越界了,检查一下代码,是不是有substring这样的操作,应该是这样引起的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询