# Import 'javax.media' in Python mode

**URL:** <https://discourse.processing.org/t/import-javax-media-in-python-mode/13428>\
**Category:** Processing.py\
**Created:** [August 17, 2019, 12:22pm UTC](https://discourse.processing.org/t/import-javax-media-in-python-mode/13428 "2019-08-17T12:22:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![solub](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/solub/32/333_2.png) [@solub](https://discourse.processing.org/u/solub)\
**Post date:** [August 17, 2019, 12:22pm UTC](https://discourse.processing.org/t/import-javax-media-in-python-mode/13428/1 "2019-08-17T12:22:59Z")

</div>

Hi,

Just a quick question –

I would like to import the `PerspectiveTransform` and `WarpPerspective` classes from `javax.media.jai` in Python mode.

Simply writing `from javax.media.jai import PerspectiveTransform, WarpPerspective` returns an error:

> ImportError: No module named media

What should I do to access / install / load this ‘media’ module in Python mode ?

For the moment I’m getting around this issue by first importing the [Keystone](http://keystonep5.sourceforge.net/) library but it would be nice if I could directly access this “media” module.

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [August 17, 2019, 1:47pm UTC](https://discourse.processing.org/t/import-javax-media-in-python-mode/13428/2 "2019-08-17T13:47:19Z")

</div>

Hi @solub!

I have not tried on Java mode but maybe `javax.media.jai` could be missing from the Processing standard libraries, according to this:

> **[Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/19084/java-javax-media-not-included-in-processing-3-2-3-java-8)**
>
> Processing is an electronic sketchbook, a language and a worldwide community. This is its forum.

I’m no expert on it (I hope someone can correct me if I’m wrong), but If you can find a `.jar` file of the library, you can add it to your sketchbook under `libraries/lib_name/library/lib_name.jar` and then use `add_library("lib_name")`on your sketch.

HTH

---

<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:** [August 17, 2019, 5:11pm UTC](https://discourse.processing.org/t/import-javax-media-in-python-mode/13428/3 "2019-08-17T17:11:30Z")

</div>

I’ve found these related links: 🔗

> <https://stackoverflow.com/questions/42956053/how-to-install-javax-media-library-in-processing-3-3>

[Oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html](http://Oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html)

[Download.Java.net/media/jai/javadoc/1.1.3/jai-apidocs/index.html](http://Download.Java.net/media/jai/javadoc/1.1.3/jai-apidocs/index.html)
