# Error message when attempting to import Java library

**URL:** <https://discourse.processing.org/t/error-message-when-attempting-to-import-java-library/22799>\
**Category:** Beginners\
**Created:** [July 23, 2020, 2:13pm UTC](https://discourse.processing.org/t/error-message-when-attempting-to-import-java-library/22799 "2020-07-23T14:13:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![11OutOf10](https://avatars.discourse-cdn.com/v4/letter/1/48db29/32.png) [@11OutOf10](https://discourse.processing.org/u/11OutOf10)\
**Post date:** [July 23, 2020, 2:13pm UTC](https://discourse.processing.org/t/error-message-when-attempting-to-import-java-library/22799/1 "2020-07-23T14:13:27Z")

</div>

As the title says. I was attempting to import java.util.random using “import java.util.random;” and got an error message:

Libraries must be installed in a folder named ‘libraries’ inside the sketchbook folder (see the Preferences window).  
The package “java.util.random” does not exist. You might be missing a library.

any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 23, 2020, 2:59pm UTC](https://discourse.processing.org/t/error-message-when-attempting-to-import-java-library/22799/2 "2020-07-23T14:59:10Z")

</div>

It’s capital Random, not random: `import java.util.Random;`  
[Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/Random.html](http://Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/Random.html)

However, Processing got its own “easier” **random()** function:  
[Processing.org/reference/random\_.html](http://Processing.org/reference/random_.html)

---

<div class="post-metadata">

**Author:** ![11OutOf10](https://avatars.discourse-cdn.com/v4/letter/1/48db29/32.png) [@11OutOf10](https://discourse.processing.org/u/11OutOf10)\
**Post date:** [July 24, 2020, 9:59pm UTC](https://discourse.processing.org/t/error-message-when-attempting-to-import-java-library/22799/3 "2020-07-24T21:59:52Z")

</div>

thank you so much! The code isn’t turning up any errors anymore. Your help is greatly appreciated.
