# xrCreateInstance in forked or exec'd process

**URL:** <https://forum.magicleap.cloud/t/xrcreateinstance-in-forked-or-execd-process/802>\
**Category:** OpenXR\
**Tags:** development\
**Created:** [September 8, 2022, 12:05am UTC](https://forum.magicleap.cloud/t/xrcreateinstance-in-forked-or-execd-process/802 "2022-09-08T00:05:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hollowaya](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/hollowaya/32/274_2.png) [@hollowaya](https://forum.magicleap.cloud/u/hollowaya)\
**Post date:** [September 8, 2022, 12:05am UTC](https://forum.magicleap.cloud/t/xrcreateinstance-in-forked-or-execd-process/802/1 "2022-09-08T00:05:52Z")

</div>

It would be very useful for development purposes to be able to connected to OpenXR from a forked or exec'd process. Currently it seems that `XR_KHR_android_create_instance` is required, and that requires a pointer to the JavaVM which means running on the main Android app process.

If we could connect to OpenXR without those pointers & without needing to be in the original Android process, that would be extremely for e.g. easily getting set up with an on device Jupyter Notebook that can connect OpenXR. As well as being easily able to use tools like gdb (which needs to be exec'd). Having the source of `libopenxr_runtime.magicleap.so` (to tweak these things) would be equally useful!

---

<div class="post-metadata">

**Author:** ![sengelman](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/sengelman/32/11_2.png) [@sengelman](https://forum.magicleap.cloud/u/sengelman)\
**Post date:** [September 15, 2022, 4:43pm UTC](https://forum.magicleap.cloud/t/xrcreateinstance-in-forked-or-execd-process/802/2 "2022-09-15T16:43:41Z")

</div>

@hollowaya , our runtime works out-of-the-box with standard Android tooling. It's possible to run the `hello_xr` sample compiled from the OpenXR working group on ML2 without recompiling!

To create an OpenXR instance, you'd need the JVM info. Without that, there is no lifecycle of events possible. You may need to research how to access JVM info from within Jupyter Notebooks.

---

<div class="post-metadata">

**Author:** ![kdowney](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kdowney/32/481_2.png) [@kdowney](https://forum.magicleap.cloud/u/kdowney)\
**Post date:** [October 24, 2022, 8:11pm UTC](https://forum.magicleap.cloud/t/xrcreateinstance-in-forked-or-execd-process/802/3 "2022-10-24T20:11:25Z")

</div>

Closing this thread, thanks for participating on the Magic Leap 2 forum!
