2020a protobuf version

조회 수: 31 (최근 30일)
Matt
Matt 2021년 4월 1일
댓글: Matt 2022년 8월 3일
A few years ago I wrote some hybrid Java/Matlab code to handle reading/writing Google protobuf messages. Initially I built this on protobuf version 3.5.0. More recently I updated this code to use protobuf version 3.7.1. This code no longer works after updating to Matlab 2020a when using the .jar's I compiled with protobuf 3.7.1; it still works with the .jar's using 3.5.0. I came across a forum here that leads me to believe the issue is that Matlab is now shipping with "built in" protobuf jars (R2020A\java\jarext\protobuf3.jar), which it adds to its static Java path, but conflict with certain newer protobuf features. Because it is on the static path I can't dynamically give my jars "preference" via javaaddpath. The only work-around I can think of is via a javaclasspath file to update the static path, but this is not a reasonable option as the code is used by multiple users on different machines via a network license. Is there anything I can do about this? It's been quite a while, but I believe I moved from protobuf version 3.5.0 up to 3.7.1 because the older one can conflict with some features in newer Java versions, so it's unstable in more recent versions of Matlab. Which protobuf versions are supported by the protobuf3.jar included with R2020a? If it supports protobuf 3.6.x I can try compiling my code again using that version, assuming it is supported by newer Java versions. Thanks!
  댓글 수: 2
Bill Gruner
Bill Gruner 2022년 8월 2일
I just ran into the same issue. Any luck?
Matt
Matt 2022년 8월 3일
No, and I just submitted an updated bug report last week. If you don't mind messing with your installation files, you can delete or move (so you can move it back) the protobuf3.jar I mentioned in the question. You can also adjust your static Java path, but I can't remember how to do that. There may be other .jar's you have to deal with as well (I had to also deal with gson.jar in R2022a).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Java from MATLAB에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by