[Resolved] Javax.media does not exist! Netbeans or Eclipse Error

Javax.media does NOT FOUND error is the error which we get whenever we try to use import javax.media.*; statement. This error occurs at the compile time of the code in which we use javafx.media code.

Why this error occurs?

We always get mistaken that whether Java Runtime Environment (JRE) is correctly installed or not! Or there might be a problem with JDK (Java Development Kit). But let me tell you, there isn’t any problem with your JRE and it is completely inappropriate to guess a problem with JDK because all that packages are the part of JRE not JDK as JDK deals with java applets and java applications. The problem is with the media package which isn’t part of default JRE as it is the part of Java Media Framework (JMF) which is provided as a separate part in the downloading list in the Oracle website. As you peep inside the rt.jar file (which is the core file for storing the packages) you may find that there is no directory named media inside javax folder. This indicates the media class of javax is not found which the compiler was searching for.

How to locate java packages on your local drive?

Java package can be located on your hard drive as-

  1. Open default directory where java is installed. Probably the default address to java directory is C:\Program Files\Java\jdk1.8.0_91 or C:\Program Files (x86)\Java\jre1.8.0_91.
  2. Then open jre directory followed by lib directory (jre>>lib) or directly open C:\ Program Files\Java\jdk1.8.0_91\jre\lib | C:\ Program Files (x86)\Java\jdk1.8.0_91\jre\lib
  3. There you will find rt.jar file. Open it with any archive software like winrar, 7-zip or jzip.

What is the use of Javax.media or Java Media Framework (JMF)?

Java Media Framework is used to built java based media player or any audio-visual application which involves media interaction. This provides full control over basic media operations which every media player must have like play, pause, stop and plenty of advanced features like reporting download feature, renderer, track listener, capture device manager and a lot more.

How to fix javax.media Does Not Exist Error?

This error can be fixed using installing Java Media Framework (JMF) through the official website of oracle. You can download the framework and install it and as soon as you install this framework the compiler won’t disturb you anymore as it will find that missing file folder named media in the default package file. You can go to the address

and download Java Media Framework (JMF) for your suitable operating system. I suggest you download Cross-platform Java zip rather than downloading performance pack.

Now follow the following steps to completely remove the error 

1. Open the cross-platform zip file and open directory named 'lib' and find and extract jmf.jar file, once you've found it the only task is to add it to your project in NetBeans or eclipse IDE. Alternatively, you can download the jar file from this link also - JME.jar

2. Now open Eclipse or Netbeans IDE whichever you use to develop applications.

For Netbeans

Right Click on the 'Libraries' and select Add JAR/Folder and now browse for jme.jar file 

For Eclipse

Right Click on Project >> Properties >> Java Build Path >> Add External Jars...

Browse for jmf.jar file.

Once you have added the jar file now just compile the project and you will find no errors.

Post a Comment


  1. I'm very glad that the problem is solved, but I wanted to add if you still have problems with any matter that is related to JAVA, you can safely watch any answers on this website https://explainjava.com/category/java/java-core/ For my projects, it has always been like a bible for a programmer. On some articles I found answers to my questions, and solutions for my mistakes. A very useful source, I recommend it to everyone who is just starting to learn the programming language as well as the already experienced users of this platform.


Although every comment is appreciated, Keep in mind that any link or keyword in the comments may be the reason for the deletion of your comment. Thanks for understanding!