How can I see the java classes that I used in my standalone applications?
2 views (last 30 days)
Show older comments
Hello. Thank you for reading my question.
I develop the standalone applications using MATLAB Compiler. I make serial communication program with GUI.
When I make app and execute, javaclass missing error bothers me. So I solved this problem for adding instrument.jar and testmeas.jar in classpath.txt.
But, I don't know why adds the 2 jar file.
I want to know that what must be added in classpath. Can I see the list of jar file that is needed for my application? Is there matlab function?
Thank you for your attention.
0 Comments
Answers (1)
Harsheel
on 27 Jul 2015
You can indirectly find the JAVA classes that your application loads.
>> [a1,b1,c1] = inmem;
>> run your application
>> [a2,b2,c2] = inmem;
>> setdiff(c2,c1)
c1 and c2 lists the JAVA classes loaded in MATLAB. c2 - c1 will list the extra JAVA classes loaded by your application. The common ones in c1,c2 were most likely loaded by MATLAB and you don't have to worry about them as some of these are not required when you run your compiled application and some are already included with the compiled application.
Note that the issue related to compiling serial function was very specific where the correct .jar files were not picked up during compilation. For the most part, you won't have to do detective work on which .jar files have to be added to the classpath so that the compiled application runs fine. This will be done automatically if the .jar file is shipped with MATLAB.
That being said, the issue with serial command will be resolved soon.
2 Comments
Harsheel
on 28 Jul 2015
You mentioned in the question that you already resolved the problem. Is that not true? What is the error message you are getting?
See Also
Categories
Find more on Java Package Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!