1

SI've got some MATLAB scripts which I successfully compiled into a .jar using the MATLAB builder JA. I've imported this jar to a testing project and it works fine, but when I try to import that .jar file into another project, I get this error:

{Warning: Wrong JPEG library version: library is 80, caller expects 62} 
{??? Error using ==> jpeg_depth
Wrong JPEG library version: library is 80, caller expects 62

Error in ==> readjpg at 13



Error in ==> imread at 443

The project which launches the error uses swing and awt, the testing project where the .jar works doesn't. So, could this be related ??? I mean, it's like the fact of using awt launches the libjpeg 80, and it seems the .jar has been compiled with the libjpeg60 version. So, my questions are: - Is there any way to forcing MATLAB to use libjpeg80 on compiling? - If there isn't, what should I do?

Thanks in advance.

PS: It seems that the rerror is related with all the functionality that uses libjpeg, because this error is given when the code has a Swing Imagicon, or a BufferedImage, not when this kind of code (image manipulation) isn't. So, the .jar is compiled against the libjpeg.so.62 headers and I need it to compile agains the libjpeg.so.8. I've tried deleting the libjpeg.so.62 and recompiling but that didn't work. Any help?

1 Answer 1

1

SOLVED: I was using the incorrect JRE. As a default project, Iwas using the system JRE on my project, after change it for the one that comes with MATLAB, the problem dissapeared. Hope this helps someone.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.