JavaDesktop
クラスを使用して、ネイティブ アプリケーションでビデオを起動しようとしています。それを起動するコードは次のとおりです。
Desktop.getDesktop().open(myVideoFile);
ビデオ ファイルは wmv ファイルですが、起動しようとすると次の例外が発生します。
Unexpected Error
Message:
java.security.PrivilegedActionException: java.security.PrivilegedActionException: java.io.IOException: Failed to open file:/C:/Users/me/desktop/video.wmv. Error message: Unspecified error
Level:
SEVERE
Stack Trace:
null
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
null
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
java.awt.EventQueue$2.run(EventQueue.java:621)
java.awt.EventQueue$2.run(EventQueue.java:619)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Failed to open file:/C:/Users/me/desktop/video.wmv. Error message: Unspecified error
sun.awt.windows.WDesktopPeer.ShellExecute(WDesktopPeer.java:59)
sun.awt.windows.WDesktopPeer.open(WDesktopPeer.java:36)
java.awt.Desktop.open(Desktop.java:254)
java_awt_Desktop$open.call(Unknown Source)
同じコードを使用して jpg ファイルを開くと機能します。ここで何をすべきかについて何か考えはありますか?