# Cannot access classes from org.knime.core bundle in Java Snippet node

**URL:** <https://forum.knime.com/t/cannot-access-classes-from-org-knime-core-bundle-in-java-snippet-node/85754>\
**Category:** KNIME Analytics Platform\
**Tags:** java-snippet, bug\
**Created:** [January 14, 2025, 4:50pm UTC](https://forum.knime.com/t/cannot-access-classes-from-org-knime-core-bundle-in-java-snippet-node/85754 "2025-01-14T16:50:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [January 31, 2025, 8:45pm UTC](https://forum.knime.com/t/cannot-access-classes-from-org-knime-core-bundle-in-java-snippet-node/85754/5 "2025-01-31T20:45:41Z")

</div>

> [@BenjaminMoser](#):
>
> The drawback is that this path contains the bundle version, which means it will change with an update.

I _may_ be able to help with that… I have a component… 😉

> **[Collect Required Plugin Jars – takbb](https://hub.knime.com/takbb/spaces/Experimental/Collect%20Required%20Plugin%20Jars~MTiFavWubk43D0h6/current-state)**
>
> Locates the selected list of jar files, which can include wildcards from the KNIME plugins folder. The list of file names is returned as the String List flow v…

I already had this component to go try to find bundles to get round the problem of things changing every time there was a new KNIME update, and based on your comments above, I’ve added the option to search subfolders of the bundles for required jars.

It should work the same way with both Java Snippet and Java Edit Variable…

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/d/fd96c49ed2fe1c9cc391a83d64702fa98448d8e8.png)

As you can see from the screenshot, when the additional libraries has been specified using the flow variable, the syntax highlighter of the java editor does not recognise that the package is present. However, as you can also see from the node state and the output, it does actually compile and execute , returning the output “(WFM) ROOT (IDLE)” in this case as a flow variable.

So, possibly for editing the java, you’d want to add the required additional library in manually, but then for “shipping”, you could add it in using the flow variable from the “Collect Required Plugin Jars” component.

In the component you specify a file name pattern for it to search, so this kind of becomes an “abstraction layer” instead of being tied to a physical version number.

I have this component in my “experimental” folder on the hub, but its available to try, and happy to get feedback and suggestions if it is helpful.

([background/origin of this component](https://forum.knime.com/t/write-to-excel-template-not-updating-specific-cells-with-formula/83289/9))

---

_[View the full topic](https://forum.knime.com/t/cannot-access-classes-from-org-knime-core-bundle-in-java-snippet-node/85754)._
