问题
System: Win 7 64 bit
JMF works on my system by starting JMstudio, it finds my drivers and starts my mic and webcam. But when I run the Netbeans code it doesn't work.
I have followed these steps on this website to install JMF on Win 7 64bit, without success: https://forums.oracle.com/thread/2134405. I have searched in all the other answers related to this problem without any success. It should work on my 64 bit as stated in the link I pasted here.
I have installed 32 bit Java JDK, Moved the DLL's from the JMF install folder to System32 and SysWOW64, No errors in the code and JMF.jar is added.
Any solutions? When I run it, I get the following error:
Exception in thread "VFW Request Thread" java.lang.UnsatisfiedLinkError: JMFSecurityManager: java.lang.UnsatisfiedLinkError: C:\Windows\System32\jmvfw.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at com.sun.media.JMFSecurityManager.loadLibrary(JMFSecurityManager.java:206)
at com.sun.media.protocol.vfw.VFWCapture.<clinit>(VFWCapture.java:19)
at com.sun.media.protocol.vfw.VFWSourceStream.doConnect(VFWSourceStream.java:241)
at com.sun.media.protocol.vfw.VFWSourceStream.run(VFWSourceStream.java:763)
at java.lang.Thread.run(Thread.java:724)
回答1:
I found out that my system was still running the 64 bit Java, while I installed the 32 bit. Traces of Java 64 bit were still present on my system, so I removed all traces of Java, then installed the latest Java JDK 7 on my system. Copy, pasted C:\Program Files (x86)\Java to C:\Program Files\Java, then changed the PATH and CLASSPATH to C:\Program Files\Java. java -version in cmd worked after this and the project in Netbeans 7.4 with JMF.jar runs and captures my webcam.
回答2:
I also fell into this trap of multiple JVM's configuration 32/64 bit, make sure to match the .DLL version with JVM, i.e., 32 bit should run on 32 bit. The same applies for 64 bit.
For more information refer to eclipse forum: https://www.eclipse.org/forums/index.php/t/781808/
来源:https://stackoverflow.com/questions/19518304/jmvfw-dll-cant-load-ia-32-bit-dll-on-a-amd-64-bit-platform