tags:

views:

49

answers:

2

Hey dear all, I try to start Matlab(version 7.6.0 R2008) and received the error: "Cannot locate com/mathworks/jmi/OpaqueJavaInterface".

I did some googling, and it seems this is related with the jre Matlab is using.

Here is what I have done: I checked my java project and found that my source lookup path is: "c:\Program Files\Java\jre6", so I added one MATLAB_JAVA environment variable as follows in the advance tab in system property: MATLAB_JAVA C:\Program FIles\JAVA\Jre6

Still I received this error, How can I solve it?

thank you for your help.

BTW: how can I check this newly added environment variable?

A: 

Your solution is incorrect: there's no .class file named com.mathworks.jmi.OpaqueJavaInterface in that directory, not in an JAR file it contains.

It's a MATLAB class, so you should find it in a JAR file that ships with MATLAB. Find out which one and add it to your CLASSPATH for Java.

There are lots of places that tell you how to set CLASSPATH if you don't know how.

duffymo
+3  A: 

That sounds like your MATLAB installation is corrupted - it could be that one of the files is missing (in this case, I believe that java class would reside in <matlab>/java/jar/jmi.jar). You should also check <matlab>/toolbox/local/classpath.txt to see if that has been modified.

It may be simplest to re-install MATLAB.

Edric
Confirmed - I have a working R2008a install, and jmi.jar is where that class lives.
Andrew Janke