How can I see the java classes that I used in my standalone applications?

3 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Harsheel
Harsheel il 27 Lug 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 Commenti
Youngwoong Kim
Youngwoong Kim il 27 Lug 2015
Thank you for answering my question. The App in the computer installed MATLAB works well. But, The App in the computer without MATLAB doesn't work.
I can see the classes used in app. but, I still don't know whether which .jar files have to be added.
Harsheel
Harsheel il 28 Lug 2015
You mentioned in the question that you already resolved the problem. Is that not true? What is the error message you are getting?

Accedi per commentare.

Categorie

Scopri di più su Java Package Integration in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by