Rhino can run headlessly only, inside Java

Issue

I was trying to run Rhino.Inside inside Java 8 using jni4net as the bootstrapper. It didn’t work with the following code:

Core = new RhinoCore(new string[] { }, WindowStyle.Normal);

after ~3 seconds of execution, an exception pop up: InteropServices.COMException: 'Error HRESULT E_FAIL has been returned from a call to a COM component.' Error code (0x80004005).

However, Rhino.Inside runs without window by:

Core = new RhinoCore(new string[] { }, WindowStyle.NoWindow);

RhinoCommon is soon usable, but this defys the original intent of using Rhino.Inside.

Environment

  • I am using the latest 7.3.
  • Rhino Inside Revit runs normally.
  • JRE 8 is 64-bit

Question

I can use interprocess communication but I found Rhino.Inside might be more interesting.

Any idea on this issue or how to debug such a situaiton?

Code

Java code & binary: eclipse-workspace.zip (333.9 KB). Run rhinoInsideJava.bat. Make sure you have 64-biyt JRE 8 in PATH.

C# source for reference: McLivelink.zip (4.9 KB)

rhino.exe is never loaded into a Rhino.Inside project. RhinoCore.dll is what gets loaded.

Rhino.Inside only works with 64 bit processes. This is also something you need to check.

1 Like

I checked it was hosted in 64-but process. Forgot to mention :zipper_mouth_face:

:slight_smile:


You might want to try WindowStyle.None. It may be that Rhino.Inside will currently only work in a headless mode for minecraft

You are right. Rhino.Inside is only able to run headlessly, in a Java program (not specifcally Minecraft). :thinking: Hopefully the limitation can be overcome…

Provided a much simpler example