Eclipse java support

I see eclipse support mentioned, but on the main wiki page (, the link to eclipse instructions appears to go nowhere. I tried the intellij instructions, but I get tons of compiler errors for (e.g., the cdm package doesn’t exist). (And anyway I’d rather use Eclipse.)

I’m using the 2.2.0 release code from here:

I also tried getting the latest version of from master and the 2.x branch. There were definitely changes relative to what is in the release, but I’m still getting similar build errors.

Is this a known issue? Should I be grabbing the latest off master rather than the release? What’s the status of eclipse vs. intellij? Thanks!

I use eclipse pretty regularly, so it has way better support than intellij.

Use 2.x brach. I will be tagging a new release next week sometime, and merging it into master.

There are eclipse projects in the repo, just point eclipse to the source root and it should find them. There is also an eclipse variable you will need to set to the path location to you source and/or build folder. (look at the problems tab, it should note which variable it is.

You are correct, there is no eclipse support page. I will work on that ASAP and correct any mistakes and clarify any details here. I apologize for that.

Also note that there seems to be a problem with the protobuf provided Java code. But everything runs fine, but eclipse will bug you about a build error in the auto-generated code in the Data Model Bindings project.

1 Like

I cloned the 2.x branch. I followed the MSVC instructions on the wiki and was able to build Pulse-SuperBuild.sln just fine. I then tried to build Pulse.sln in Debug as instructed, and I get the error:

Cannot open include file: ‘properties/SEScalarFlowCompliance.h’: No such file or directory PulseCLR pulse-engine\source\engine\clr\PulseEngine.cpp 11

I’m using VS 2015.

It looks like you enabled the CLR option.
I have since been concentrating on a C to C# Api rather than the CLR via managed C++. Unity prefers the C style encapsulation. So I can see it having build issues with it.

I am probably going to disable the ability to build the CLR until someone has a need for it rather than the newer C# encapsulation.

1 Like

Without the CLR option, it builds! The only reason I selected that option was because the instructions here mention it:

Thanks for taking the time to read and report your issues. I’ll be sure to review and update these docs before our next release (next week)

I have the java projects imported into Eclipse, and the SOURCE_DIR classpath variable is set so everything builds (and I have the expected protobuf error).

I was able to run HowTo_Engine (which appears to assume that the working directory is <pulse/bin>). So I set that as the working directory, and when I run it, it eventually gets a fatal error:

INFO  HowTo_EngineUse::258::Total Lung Volume 2224.337605484883mL
INFO  HowTo_EngineUse::259::Blood Volume 5600.049485623451mL
INFO  HowTo_EngineUse$MyListener::61:: : [1.02(s)] [Action] 1.02(s), Patient Action : Hemorrhage
	Rate: 200(mL/min)
	For Compartment: RightLeg
	Type: External
FATAL HowTo_EngineUse$MyListener::64:: : [39.22(s)] Can't transport with a negative volume included. Node = RightLegVasculature. Volume = -0.0191784 mL
FATAL:Can't transport with a negative volume included. Node = RightLegVasculature. Volume = -0.0191784 mL : 
JNI Caught Exception [39.22(s)] Can't transport with a negative volume included. Node = RightLegVasculature. Volume = -0.0191784 mL 
ERROR HowTo_EngineUse::278::Engine was unable to stay within modeling parameters with requested actions

For HowTo_RunScenario, it appears to assume it is in both <pulse/bin> (to load the native libs) and in <pulse/source> (e.g., line 109 wants to load a scenario file from a path that appears to be relative to that location). How is this intended to be run? I tried setting java.library.path to <pulse/bin> and making <pulse/source> the working directory, but the code in appears to assume the working directory as the location of the libraries, so this does not work.

I must not have updated this driver.
A 200mL from the leg is too much.

Set it to about 75mL

Refer to this issue, which should be addressed in the next few months

That worked! For future readers, the change was on this line towards the end of the example() method:

Privacy Notice