Skip to main content



      Home
Home » Newcomers » Newcomers » Installing JMF with eclipse
Installing JMF with eclipse [message #255443] Sun, 04 May 2008 20:55 Go to next message
Eclipse UserFriend
Originally posted by: vinnieza.hotmail.com

Hi, i'm trying to use JMF with eclipse. I have downloaded the software
from:

http://java.sun.com/products/java-media/jmf/2.1.1/download.h tml

I have added the all the jars in the lib folder to the eclipse class path
by going to:

windows > java > build path > class variables > new

I tried adding just the folder but have also tried adding all the jars
separately. I made a quick test by writing a program that just imports

import javax.media.*;
.

However, it does not compile in eclipse (i get the following error):

Quote:

"Exception in thread "main" java.lang.Error: Unresolved compilation
problem:

at MediaPlayer.main(MediaPlayer.java:4)"



However, if i compile the file from command line it compiles fine. Any
ideas what i have done wrong? It must be something to do with the way i'm
setting up eclipse but cannot find out what.

Thanks
Re: Installing JMF with eclipse [message #255468 is a reply to message #255443] Mon, 05 May 2008 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

You also need to go to the project's popup and via Properties->Java
Build Path->Libraries add the libraries to be available on the build
path for that project.

vinnieza wrote:
> Hi, i'm trying to use JMF with eclipse. I have downloaded the software
> from:
>
> http://java.sun.com/products/java-media/jmf/2.1.1/download.h tml
>
> I have added the all the jars in the lib folder to the eclipse class
> path by going to:
> windows > java > build path > class variables > new
>
> I tried adding just the folder but have also tried adding all the jars
> separately. I made a quick test by writing a program that just imports
>
import javax.media.*;
.
> However, it does not compile in eclipse (i get the following error):
>
>
Quote:

> "Exception in thread "main" java.lang.Error: Unresolved compilation
> problem:
>
> at MediaPlayer.main(MediaPlayer.java:4)"
>

>
> However, if i compile the file from command line it compiles fine. Any
> ideas what i have done wrong? It must be something to do with the way
> i'm setting up eclipse but cannot find out what.
>
> Thanks
>
>
>
Re: Installing JMF with eclipse [message #255492 is a reply to message #255443] Mon, 05 May 2008 08:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

vinnieza wrote:
> Hi, i'm trying to use JMF with eclipse. I have downloaded the software
> from:
>
> http://java.sun.com/products/java-media/jmf/2.1.1/download.h tml
>
> I have added the all the jars in the lib folder to the eclipse class
> path by going to:
> windows > java > build path > class variables > new
>
> I tried adding just the folder but have also tried adding all the jars
> separately. I made a quick test by writing a program that just imports
>
import javax.media.*;
.
> However, it does not compile in eclipse (i get the following error):
>
>
Quote:

> "Exception in thread "main" java.lang.Error: Unresolved compilation
> problem:
>
> at MediaPlayer.main(MediaPlayer.java:4)"
>

>
> However, if i compile the file from command line it compiles fine. Any
> ideas what i have done wrong? It must be something to do with the way
> i'm setting up eclipse but cannot find out what.

As Ed said, you need to add the Classpath Variable you created to the
Build Path of your project (right-click on the project and select
Properties).
I strongly suggest you open the Help Contents and find the tutorials
under the Java Development User Guide > Getting Started section. There
is a tutorial specifically about project organization that will help you
understand how to set up projects in Eclipse. The hour or two you spend
there will save you many more hours down the road as you use Eclipse.

Feel free to post follow-up questions here if the tutorial doesn't
answer them all.

Eric
Re: Installing JMF with eclipse [message #255519 is a reply to message #255492] Mon, 05 May 2008 13:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vinnieza.hotmail.com

Perfect, thanks for your help.

Also thanks for the tip about the tutorial, i will have a look at it- the
amount of times i struggle adding additional functionality to eclipse.

Thanks again
Re: Installing JMF with eclipse [message #522281 is a reply to message #255519] Sun, 21 March 2010 22:47 Go to previous messageGo to next message
Eclipse UserFriend
I get the following error message in eclipse for all javax.media imports.:

"Access restriction: The type Buffer is not accessible due to restriction on required library C:\Program
Files\Java\jre6\lib\ext\jmf.jar"

I added the following classpath variable under java build path"
jmf C:/Program Files/Java/JMF-2.1.1e/lib/jmf.jar

I added jmf variable to the project's build path libraries.

I am able to compile jmf code in command line.

Any idea how to get jmf to compile with eclipse?
Re: Installing JMF with eclipse [message #522386 is a reply to message #522281] Mon, 22 March 2010 10:05 Go to previous messageGo to next message
Eclipse UserFriend
On 3/21/10 10:47 PM, hobojjr wrote:
> I get the following error message in eclipse for all javax.media imports.:
>
> "Access restriction: The type Buffer is not accessible due to
> restriction on required library C:\Program Files\Java\jre6\lib\ext\jmf.jar"
>
> I added the following classpath variable under java build path"
> jmf C:/Program Files/Java/JMF-2.1.1e/lib/jmf.jar
>
> I added jmf variable to the project's build path libraries.
>
> I am able to compile jmf code in command line.
>
> Any idea how to get jmf to compile with eclipse?


Take the JMF jar out of your JRE lib/ext/ directory (the lib/ext
"feature" is perhaps one of the worst ideas ever implemented in the JRE,
in my opinion).
If you're project needs JMF, just include that JAR in the project's own
lib/ directory and add it to the Build Path.

Hope this helps,
Eric
Re: Installing JMF with eclipse [message #522397 is a reply to message #522281] Mon, 22 March 2010 10:29 Go to previous message
Eclipse UserFriend
On 3/21/2010 8:47 PM, hobojjr wrote:
> I get the following error message in eclipse for all javax.media imports.:
>
> "Access restriction: The type Buffer is not accessible due to
> restriction on required library C:\Program Files\Java\jre6\lib\ext\jmf.jar"
>
> I added the following classpath variable under java build path"
> jmf C:/Program Files/Java/JMF-2.1.1e/lib/jmf.jar
>
> I added jmf variable to the project's build path libraries.
>
> I am able to compile jmf code in command line.
>
> Any idea how to get jmf to compile with eclipse?


If new to Eclipse, you might benefit from this tutorial on JARs, Build
Path including how to include "foreign" JARs in Eclipse:

http://www.windofkeltia.com/j2ee/jar-tutorial.html

Good luck.
Previous Topic:Unable to Integrate Fat Jar Eclipse Plug-In
Next Topic:Packing Java Project Into Jar
Goto Forum:
  


Current Time: Sun Jun 08 16:08:18 EDT 2025

Powered by FUDForum. Page generated in 0.09125 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top