trying to execute "javaaddpath" from c++ compiled .m file.

1 view (last 30 days)
I am calling a compiled .m file from my c++ program that executes "javaaddpath". Upon execution of this line of code, the error statement: [??? Undefined variable "com" or class "com.mathworks.jmi.ClassLoaderManager.getClassLoaderManager"]. I initialize the shared object with my .m file using mclmcrInitialize() followed by if(!mclInitializeApplication(mcc_args, 1)) where mcc_args is "-nodisplay". When I startup matlab manually separate from my c++ application, I see that "com.mathworks.jmi.ClassLoaderManager" exists upon start-up. What do I need to do to have it exist when my compiled .m file executes in my c++ program?

Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!