# Using the Java Activities Pack: Example Not Working

**URL:** <https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885>\
**Category:** Help\
**Tags:** java, activities\
**Created:** [March 5, 2019, 7:01pm UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885 "2019-03-05T19:01:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvent978](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/cvent978/32/6794_2.png) [@cvent978](https://forum.uipath.com/u/cvent978)\
**Post date:** [March 5, 2019, 7:01pm UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/1 "2019-03-05T19:01:23Z")

</div>

I am trying to run the example workflow included at the bottom of the page [here](https://activities.uipath.com/docs/about-the-java-activities-pack) and it is not running properly. I get passed the Java Scope activity, so I believe the path to the JDK is correctly appended to my PATH environment variable. The error I am getting occurs in the first Invoke Java Mathod. It is saying that “The method could not be invoked.” And if I click on the details button it tells me “The target type was not found” I don’t understand what the problem is, I question whether or not this example even works for anyone else. I also don’t understand what Objects.jar is being referenced in the Load Jar activity. This .jar file does not exist anywhere in what is downloaded from the “About the Java Activities Pack” page. Please advise, any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![loginerror](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/loginerror/32/22614_2.png) [@loginerror](https://forum.uipath.com/u/loginerror)\
**Post date:** [March 11, 2019, 9:10am UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/2 "2019-03-11T09:10:32Z")

</div>

Hi @cvent978

Thanks for lettings us know!

---

<div class="post-metadata">

**Author:** ![cvent978](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/cvent978/32/6794_2.png) [@cvent978](https://forum.uipath.com/u/cvent978)\
**Post date:** [March 12, 2019, 12:54pm UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/3 "2019-03-12T12:54:19Z")

</div>

Is it possible to get an updated example that works? I think there is significant value in utilizing Java within automations. My colleague had a client scenario in which she had to use values from a Java method, and she was able to figure it out but it would be great to have a simple point of reference from UiPath. 🙂

---

<div class="post-metadata">

**Author:** ![loginerror](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/loginerror/32/22614_2.png) [@loginerror](https://forum.uipath.com/u/loginerror)\
**Post date:** [April 16, 2019, 3:09pm UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/4 "2019-04-16T15:09:40Z")

</div>

Hi @cvent978

Could you give it a try now (please re-download the example) and let us know? It should work now! 🙂

---

<div class="post-metadata">

**Author:** ![cvent978](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/cvent978/32/6794_2.png) [@cvent978](https://forum.uipath.com/u/cvent978)\
**Post date:** [April 16, 2019, 7:35pm UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/5 "2019-04-16T19:35:35Z")

</div>

Yes all good now, thanks for the fix!

---

<div class="post-metadata">

**Author:** ![Abhimanyu\_Thite](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/abhimanyu_thite/32/66304_2.png) [@Abhimanyu\_Thite](https://forum.uipath.com/u/Abhimanyu_Thite)\
**Post date:** [October 14, 2019, 6:39am UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/6 "2019-10-14T06:39:55Z")

</div>

@cvent978 Can you please share the example, How did you use this java activity .

---

<div class="post-metadata">

**Author:** ![Abhimanyu\_Thite](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/abhimanyu_thite/32/66304_2.png) [@Abhimanyu\_Thite](https://forum.uipath.com/u/Abhimanyu_Thite)\
**Post date:** [October 14, 2019, 6:57am UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/7 "2019-10-14T06:57:17Z")

</div>

Got the example.

> **[Running Static and Object Methods](https://docs.uipath.com/activities/docs/running-static-and-object-methods)**
>
> To exemplify how to use this activity pack, we have built an automation process which showcases its capabilities of running both static and object methods, split into two parts: For the first part, a Java library is initialized by using the Java...

---

<div class="post-metadata">

**Author:** ![sunilraju](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sunilraju/32/176642_2.png) [@sunilraju](https://forum.uipath.com/u/sunilraju)\
**Post date:** [October 14, 2019, 7:53am UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/8 "2019-10-14T07:53:42Z")

</div>

@Abhimanyu,

can you please share the same example for me.

---

<div class="post-metadata">

**Author:** ![Abhimanyu\_Thite](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/abhimanyu_thite/32/66304_2.png) [@Abhimanyu\_Thite](https://forum.uipath.com/u/Abhimanyu_Thite)\
**Post date:** [October 14, 2019, 8:24am UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/9 "2019-10-14T08:24:19Z")

</div>

@sunilraju please refer following link having detailed explanation

> [@Using the Java Activities Pack: Example Not Working](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/7):
>
> Got the example.

---

<div class="post-metadata">

**Author:** ![sunilraju](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sunilraju/32/176642_2.png) [@sunilraju](https://forum.uipath.com/u/sunilraju)\
**Post date:** [October 14, 2019, 8:31am UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/10 "2019-10-14T08:31:22Z")

</div>

@Abhimanyu,

Thanks for sharing.

---

<div class="post-metadata">

**Author:** ![Ayad\_LABIAD](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Ayad\_LABIAD](https://forum.uipath.com/u/Ayad_LABIAD)\
**Post date:** [July 6, 2020, 4:44pm UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/11 "2020-07-06T16:44:54Z")

</div>

Hello All,

I tried this example and unfortunately, for me it doesn’t work, I have the same issue as in this forum.  
Can you help me?

Regards

---

<div class="post-metadata">

**Author:** ![Ayad\_LABIAD](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Ayad\_LABIAD](https://forum.uipath.com/u/Ayad_LABIAD)\
**Post date:** [July 6, 2020, 5:03pm UTC](https://forum.uipath.com/t/using-the-java-activities-pack-example-not-working/99885/12 "2020-07-06T17:03:38Z")

</div>

> [@Aggregate Exception while invoking java code from UIpath](https://forum.uipath.com/t/aggregate-exception-while-invoking-java-code-from-uipath/167477):
>
> Hi All, I m getting a System.AggregateException, when I try to invoke java code from uipath. An error always pointed to Invoke Java method, the path of the jar file and method name are proper. please suggest me some solutions for this. I have attached the Exception screenshot for your reference.[AggregateException]
