954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

JMF and Eclipse

Hi, I'm building an application and I want to it to play mp3 files.
I have it working, basically by installing JMF2.1.1e, and then I add its jmf.jar file to the build path of the project within eclipse.

When I then jar up the project, and place on desktop, it works fine.

But the project relies on the JMF2.1.1e being installed, I'd like to make it portable so the project can be run on any computer that has a jdk1.4(or higher) installed, without having to install the JMF.

So basically I would like to try and add the components of the JMF2.1.1e to my project, and bundle them into the projects jar file, when I turn it into a jar.

I can't quite get it to work though, if anyone can help, I'd be very greatful.
My messenger address is cms271828 (yahoo) and [EMAIL="colin.shuker@tiscali.co.uk(msn"]colin.shuker@tiscali.co.uk(msn[/EMAIL]),
if anyone would like to chat with me direct, which would probably be easier for me.

Thanks for any help

cms271828
Junior Poster
123 posts since Oct 2006
Reputation Points: 20
Solved Threads: 4
 

You won't be able to put jars in your jar. Typically you would just include that jar file in a" /lib" folder in your installation and add that reference to the class path entry in your application jar manifest file.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

Yeh, currently I'm adding the jmf.jar to the build path, but its not really adding it, its just adding the path of the jar file.

I'm trying to make the project portable, so users can just download a jar file of project, and possibly install JMF2.1.1e, and then the jar file of project will work, and play sounds.

I guess... If users install JMF2.1.1e in a specific location, eg C:/Program Files/JMF2.1.1e,
Then inside eclipse, I can configure the build path to use C:/Program Files/JMF2.1.1e/lib/jmf.jar.

So when I jar up the project, and a user downloads it, it will know where to look for jmf.jar.

Isn't there another way, like by adding the contents of jmf.jar inside the project somehow?

Thanks

cms271828
Junior Poster
123 posts since Oct 2006
Reputation Points: 20
Solved Threads: 4
 

You really don't want to realy on the users installing JMF to a particular place. It's much easier to manage if you just zip or tar your project into a structure that includes JMF in a /lib folder and use that with your class path. The zip or tar file is still portable, they just have to uncompress it wherever they like. Keeping third party libraries in the /lib folder makes it easier to manage for you and the users.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

Actually you CAN add Jars on your path to the Jar when you Jar up a Project. I do it all the time using FatJar (Eclipse Plugin) and it makes it way easy.

I'm also trying to get a JMF app that can run anywhere without any setup on the end machine. In this case it's for code I'm going to run on company servers, not a user's machine.

mlikesit
Newbie Poster
1 post since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You