PulseJNI.so

Hello everyone,
I have created a Java application using Pulse, and it works correctly on Windows with the PulseJNI.dll. However, I would like it to work on Linux as well, and for that, I need the PulseJNI.so library. I tried building the source using xcompile.sh (the script for dockcross compile), but I wasn’t able to obtain the library.
Does anyone know how to proceed?

Thank you!

If you have a windows machine, just run the xcompile.bat
If you are using xcompile.sh, you are on a linux box, so you could just build there
xcompile.sh is rarely used, so it also might have some issues from lack of use…

I’ve tried running both the .bat and .sh scripts, but I wasn’t able to obtain the PulseJNI.so file with either of them. For reference, I’m working on the ventilator-updates branch.

Oh!
Right right, sorry, the Java build is not enabled in the xcompile scripts
But I did just do this for someone else…

I have a few things to cover off this morning, but I should be able to get something back to you today

1 Like

Hey @GIONATHA_PIROLA

Turns out to get the libJavaJNI.so to build I did a lot of ad hoc configuration that is not easily reproducable…

SO, I converted our dockcross scripts to CMake so it is easier to configure the build system for various configurations.

This is pushed up to the integration branch (soon to be Pulse 4.3.1 patch)

Same process to build, just run xcompile.bat
To get libPulseJNI.so for an android64 system just change this to ON, before you run the script and you should be good to go!

Ok, thank you!
I will look into that in the next few days and update you if it works.

I attempted to build the entire code from the integration branch using xcompile.bat, but I believe there is an issue. I am unable to retrieve the PulseJNI.so (or .dll), or even the PulseC files. The script stops after about 10 minutes, which suggests there may be a problem.

Try piping the output to a file and we can take a look

xcompile.bat > build.txt

1 Like

FYI, it will be named libPulseJNI.so

I think it’s working now. I’m not sure, but maybe I had something wrong in my directory earlier. Currently, the build is running. I’ll update you tomorrow to confirm if libPulseJNI.so is working correctly. Thank you!

Hi,
Sorry for my late response.
I have tried the libPulseJNI.so library, and it works, but I have an issue with the simulation.
I have the same app for Windows and Linux, with the only difference being the JNI file.

For example, on Windows, when I execute ps.advanceTime(time) (with time = 1 min), the Pulse engine halts at this command for one minute. However, on Linux, using the same command, the system runs for only a few seconds instead of one minute.

Could this be a bug?

That is indeed a bug that we have fixed on the integration branch

If you have that code, you should be able to rerun CMake with its build directory set to your InnerBuild directory.

You can check that Pulse is optimizing by right clicking Pulse in MSVC and going to properties and check the Optimization options

1 Like

Ok, now it works fine.
Thank you!