Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MATLAB Compiler Issue in FEDORA Regarding JAVABuilder

12 views
Skip to first unread message

Dimitrios Efthymiou

unread,
May 3, 2014, 6:04:11 PM5/3/14
to
Hello. I am using MATLAB 2014a x64 home edition in windows 7 x64. I installed the MATLAB compiler version 8.3, JDK7 is already set, because I also use MyEclipse for other projects and I set the environment variables for MATLAB. I created a simple MATLAB ".m" file with the "isPrime()" function. I used the deploytool to build a JAVA package for it. I created the JAVA program to handle that. It works in windows.

I installed the MATLAB compiler in FEDORA 19 x64, JAVA is set and for the environment I set:

LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/#bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/sys/os/glnxa64:
MATLAB=usr/local/MATLAB/MATLAB_Compiler_Runtime/v83
XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/X11/app-defaults

I noticed, by the way, that the "mcc" file does not exist in FEDORA.
I would like to know, what command I can execute in FEDORA that will compile the project since I cannot do it in windows and make it work in linux. Is there a console command for that so that it is compiled in linux x64?

And also, I copied/pasted the javabuilder.jar from the glnxa64 folder, the jar that windows created and my TestClass.class and I try to execute it by:
java -classpath javabuilder.jar:isPrime.jar:. TestClass

but I get:

Exception in thread "main" java.lang.ExceptionInInitializerError
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getProxyLibraryDir(MCRConfiguration.java:178)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.get(MCRConfiguration.java:77)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.<clinit>(MCRConfiguration.java:87)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getMCRRoot(MCRConfiguration.java:92)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ModuleDir.<clinit>(MCRConfiguration.java:66)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getModuleDir(MCRConfiguration.java:71)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1553)
at com.mathworks.toolbox.javabuilder.MWUtil.GetUnknownClassID(MWUtil.java:727)
at com.mathworks.toolbox.javabuilder.MWClassID.<clinit>(MWClassID.java:41)
at Project1.main(Project1.java:21)
Caused by: java.lang.NullPointerException
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ProxyLibraryDir.get(MCRConfiguration.java:143)
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ProxyLibraryDir.<clinit>(MCRConfiguration.java:173)
... 10 more


Can anyone give any help please?

Thank you in advance

Steven Lord

unread,
May 5, 2014, 10:01:52 AM5/5/14
to

"Dimitrios Efthymiou" <efthymiou....@gmail.com> wrote in message
news:lk3p4r$des$1...@newscl01ah.mathworks.com...
> Hello. I am using MATLAB 2014a x64 home edition in windows 7 x64. I
> installed the MATLAB compiler version 8.3, JDK7 is already set, because I
> also use MyEclipse for other projects and I set the environment variables
> for MATLAB. I created a simple MATLAB ".m" file with the "isPrime()"
> function. I used the deploytool to build a JAVA package for it. I created
> the JAVA program to handle that. It works in windows.
>
> I installed the MATLAB compiler in FEDORA 19 x64, JAVA is set and for the
> environment I set:
>
> LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/#bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/sys/os/glnxa64:
> MATLAB=usr/local/MATLAB/MATLAB_Compiler_Runtime/v83
> XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/X11/app-defaults
>
> I noticed, by the way, that the "mcc" file does not exist in FEDORA.

That suggests that MATLAB Compiler is not installed or not installed
correctly in your installation of MATLAB on Fedora.

> I would like to know, what command I can execute in FEDORA that will
> compile the project since I cannot do it in windows and make it work in
> linux. Is there a console command for that so that it is compiled in linux
> x64?
>
> And also, I copied/pasted the javabuilder.jar from the glnxa64 folder, the
> jar that windows created and my TestClass.class and I try to execute it
> by:
> java -classpath javabuilder.jar:isPrime.jar:. TestClass
>
> but I get:
>
> Exception in thread "main" java.lang.ExceptionInInitializerError

*snip*

> Can anyone give any help please?

You should contact Technical Support (see the instructions in my signature)
and work with them directly to determine the cause of that Java exception. I
suspect something's not configured or installed correctly, but they will be
able to tell for sure.

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

0 new messages