darshshah
darshshah

Reputation: 35

Java Classpath help

I am using Java Media Framework and wrote a voice communication code. I included jmf.jar file for my voice chat to run. While using the eclipse IDE, i can run the code and it works. I now make the jar file by exporting the project into executable jar. When i run this jar using java -jar voice.jar, it doesn't work. I says cannot find devices. even-though i worked well in the IDE. I searched the net and found out that this may be a problem with the classpath. So how to solve this problem. Thanks.

Upvotes: 2

Views: 587

Answers (2)

kidhuvig
kidhuvig

Reputation: 134

This is because your code is not detecting capture devices

you must copy the jmf.properties file to the same directory as your executable jar

you will find the jmf.properties file int the lib folder of your jmf installation.

For me it was C:\Program Files\JMF2.1.1e\lib\jmf.properties

Upvotes: 1

Eternal Noob
Eternal Noob

Reputation: 2807

Try

java -classpath <locationofjar>/voice.jar;<locationofjar>/jmf.jar Program

Upvotes: 0

Related Questions