After more internet research, I think I found the culprit. Matlab isn't smart enough to convert '$' to '.' in the case of inner classes. A solution is detailed here at stackoverflow.com.
Why Matlab cannot load odftoolkit SlideLayout?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to write a tool that will generate presentation documents from data and plots generated in Matlab. I am using the odftoolkit. Specifically, I am using simple-odf-0.6.6.jar and odfdom-java-0.8.7.jar. These are not the latest releases, but seem to be the only ones that Matlab loads successfully.
Using the newSlide method of the PresentationDocument instance I'm working with requires that I pass an instance of Slide.SlideLayout, which is an inner class of Slide. I can load instances Slide. I can see it when I call
methods view org.odftoolkit.simple.presentation.Slide
However, when I call the following, I get errors that I don't really know how to resolve.
methods view org.odftoolkit.simple.presentation.Slide.SlideLayout
Error using methodsview (line 99)
No class org.odftoolkit.simple.presentation.Slide.SlideLayout can be located or no methods for class
layout = org.odftoolkit.simple.presentation.Slide.SlideLayout.BLANK
The class org.odftoolkit.simple.presentation.Slide has no property or method named 'SlideLayout'.
Matlab is complaining that there is no Slide.SlideLayout class, but I can plainly see it in the jar file, I can see it in the documentation. It should be there, but Matlab cannot find or load it.
I've used java inside Matlab quite a bit in the past. And as far as I can tell I doing everything correctly, but obviously it's not working. I have tried adding the .jars to the static path and dynamic path. No dice. I don't really know where to go from here.
I see there's a submission on the FileExchange that uses this package, but it only uses the spreadsheet functionality. I am hoping someone else has used this package and could help me work through this.
What do I need to do to successfully call org.odftoolkit.simple.PresentationDocument.newSlide?
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!