Use hard path to jar file instead of copy
I 'm relatively new to Java and have this problem I can not solve.
Made an application that uses the JMF library (Suns Java Media Framework). To have it working i have to use the jmf.jar file in the JMF instalation directory (Can not copy this one, than it does not work).
Now when I run the project it works!!
When I build the project NetBeans copies the jmf.jar to a lib dir and points the class-path in the manifest to that location. Now it does not work.
I tried fooling around with the manifest file but no success.
I used this syntaxes like C\:\\Program Files\\JMF2.1.1e\\lib\\jmf.lib
I'm really stuck. Now my question is: How can I tell java or NetBeans or Ant to use an already installed directory as library?
Re: Use hard path to jar file instead of copy
Gonna try to resurrect this topic. I have a problem that I think that has something to see here. I'm now working on sound playing. For that purpose, I'm using JMF. I've already installed it, and choosing all and everyone of the recommended options while installing (like auto-updating CLASSPATH, for example). After compiling my class AudioSample, indicated in the IBM DeveloperWorks tutorial for JMF with the javac command, if I try to run it from the command line it works perfect. But that's not what I want. I need it to be able to run from inside my IDE, because I want to include in a library, what of course implies building it as a .jar. The problem is that it doesn't work when I run it from my IDE because the .jar doesn't work (if I double-click it, it doesn't work). So, as expectable, I get an error when I try to run a sound file from that library:
Unable to handle format: LINEAR, 48000.0 Hz, 24-bit, Stereo, LittleEndian, Signed, 288000.0 frame rate, FrameSize=48 bits
Failed to prefetch: com.sun.media.PlaybackEngine@7259da
Error: Unable to prefetch com.sun.media.PlaybackEngine@7259da
So please I'd need some help. I've already tried adding some stuff to classpath but it doesn't work. I'm using Netbeans IDE and this is the structure of my project: