wfdb-app-toolbox icon indicating copy to clipboard operation
wfdb-app-toolbox copied to clipboard

Build Java JARS for Java 1.8

Open ikarosilva opened this issue 8 years ago • 7 comments

ikarosilva avatar Aug 05 '16 16:08 ikarosilva

Putting this on hold for now, until MATLAB uses Java 1.8 ( the R2016b is still on 1.7).

ikarosilva avatar Sep 19 '16 12:09 ikarosilva

Hi Ikaro

For when the next MATLAB version comes out, is it done via this:

javac *.java jni/Rdsamp.java physiobank/*.java

in the src/org/physionet/wfdb directory?

cx1111 avatar Nov 01 '16 14:11 cx1111

Hi,

The easiest way is simply running 'make' where the Makefile exists. It will call Eclipse headlessly and compile the jar using the information in the xml file.

ikarosilva avatar Nov 01 '16 21:11 ikarosilva

Ikaro, Octave is already using java 1.8. Java 1.8 will be used in the version of MATLAB, according to their site. I am using Octave in Linux, so I am not able to use the toolbox. I need it so much! Please help. Is there a way for the time being to use a previous version of Octave an JDK? It cannot be done via my software repositories in Ubuntu, since openjdk7 is not even available.

gabriel-limeira avatar Apr 20 '17 19:04 gabriel-limeira

Hi, The toolbox has the Java 1.8 dependencies compiled already (wfdb-app-JVM8-0-9-10.jar). The code has also been update in wfdbloadlib:

%Check if path has not been added yet
if(~isempty(strfind(ml_jar_version,'Java 1.7')))
    wfdb_path=[wfdb_path 'wfdb-app-JVM7-0-9-10.jar'];
elseif(~isempty(strfind(ml_jar_version,'Java 1.8')))
    wfdb_path=[wfdb_path 'wfdb-app-JVM8-0-9-10.jar'];
else
    error(['Cannot load WFDB JAR on unsupported JVM: ' ml_jar_version])
end

So can you please make sure you running the latest from Github ? If so, what error are you getting ?

ikarosilva avatar Apr 21 '17 14:04 ikarosilva

Ikaro, I an running the last version of Physionet's WFDB Matlab website, which is 0-9-9. I did not get the latest version from GitHub. If this version is yet in beta stage, then I would ask that you put an observation on the wfdb website for java 1.8 users to get the newer version from github. When I get home I will try it. Thanks!

On Apr 21, 2017 11:36, "Ikaro Silva" [email protected] wrote:

Hi, The toolbox has the Java 1.8 dependencies compiled already (wfdb-app-JVM8-0-9-10.jar). The code has also been update in wfdbloadlib:

%Check if path has not been added yet if(~isempty(strfind(ml_jar_version,'Java 1.7'))) wfdb_path=[wfdb_path 'wfdb-app-JVM7-0-9-10.jar']; elseif(~isempty(strfind(ml_jar_version,'Java 1.8'))) wfdb_path=[wfdb_path 'wfdb-app-JVM8-0-9-10.jar']; else error(['Cannot load WFDB JAR on unsupported JVM: ' ml_jar_version]) end

So can you please make sure you running the latest from Github ? If so, what error are you getting ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ikarosilva/wfdb-app-toolbox/issues/129#issuecomment-296208376, or mute the thread https://github.com/notifications/unsubscribe-auth/AaigvsXDZ1ZtxDehjwtmRKsUZtO4ISc5ks5ryL8GgaJpZM4Jd2uk .

gabriel-limeira avatar Apr 21 '17 17:04 gabriel-limeira

Ok, I have some news. First of all, I was mistaken, the version in the WFDB website is the same as in Git Hub. But the Java dependencies pŕovided in each zip file are different! The zip in Physionet website had versions 1.6 and 1.7. The zip file in github has versions 1.7 and 1.8. I don't know if you have just updated the (.jar) files, maybe that's the reason. The code that you said that you would update in wfdbloadlib (in github) is still in the old version, so I got the same error as before, even though the (.jar) file has been updated.

error: Cannot load WFDB JAR on unsupported JVM: Java 1.8.0_121 error: called from wfdbloadlib at line 107 column 9 wfdbdemo at line 8 column 10

I changed manually wfdbloadlib code so that the Java 1.8 version .jar could be used. Unfortunately another error has appeared.

error: [java] java.lang.NullPointerException error: called from rdsamp at line 197 column 17 wfdbdemo at line 12 column 11 error: evaluating argument list element number 1 error: called from rdsamp at line 197 column 17 wfdbdemo at line 12 column 11

I would like to experiment with Octave too, but I was also able to get ahold of Matlab 2017a, which is running fine with the binary zip that I had downloaded from Physionet.

gabriel-limeira avatar Apr 25 '17 00:04 gabriel-limeira