使用 COM 和 Java 在 iTunes 中创建播放列表
如何使用 COM(在 Windows 上,即没有 AppleScript)从 Java 在 iTunes 中创建播放列表?
我在这里找到了一个库,它可以满足我的大部分需要,并且我有向 ITPlaylist.java 添加了一些代码,以调用“AddTrack”方法(在文档中提到了)在 iTunes 对象 ITPlaylist 上:
public void addTrack(ITTrack track) {
ITPlaylistKind k = getKind();
if (k == ITPlaylistKindUser) {
Dispatch.put(object, "AddTrack", track);
} else
throw new UnsupportedOperationException("can only add track to user playlists - kind : " + k);
}
出现错误:
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000e150, pid=3184, tid=3896
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode, sharing windows-x86)
# Problematic frame:
# C [jacob-1.14.3-x86.dll+0xe150]
#
# An error report file with more information is saved as:
# Z:\\hs_err_pid3184.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
但是当我尝试调用此方法时, 。日志文件包含:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000e150, pid=3040, tid=3756
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [jacob-1.14.3-x86.dll+0xe150]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x01ed1400): JavaThread "main" [_thread_in_native, id=3756, stack(0x003b0000,0x00400000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000005
Registers:
EAX=0x00000000, EBX=0x0490f6f8, ECX=0x003ffd8c, EDX=0x240b14e8
ESP=0x003ff9d0, EBP=0x003ffa14, ESI=0x01ed1510, EDI=0x00000005
EIP=0x1000e150, EFLAGS=0x00010246
Top of Stack: (sp=0x003ff9d0)
0x003ff9d0: 01ed1400 28404d90 28404d90 01fd9e27
0x003ff9e0: 01ed1510 003ffa28 003ffa24 01ed1400
0x003ff9f0: 2840bbaf 003ff9f4 00000000 003ffa28
0x003ffa00: 28409fb8 00000000 28404d90 00000000
0x003ffa10: 003ffa24 003ffa4c 01fd2da1 00000000
0x003ffa20: 01fd8259 240b14e8 240b39d8 003ffa2c
0x003ffa30: 2840401a 003ffa58 28409fb8 00000000
0x003ffa40: 28404040 003ffa24 003ffa54 003ffa7c
Instructions: (pc=0x1000e150)
0x1000e140: 1d 53 ff 15 20 01 01 10 66 c7 03 09 00 89 7b 08
0x1000e150: 8b 0f 8b 51 04 57 ff d2 5f 5e 5b c2 0c 00 6a ff
Stack: [0x003b0000,0x00400000], sp=0x003ff9d0, free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [jacob-1.14.3-x86.dll+0xe150]
j com.jacob.com.Variant.putObject(Ljava/lang/Object;)V+2
j com.jacob.com.VariantUtilities.populateVariant(Lcom/jacob/com/Variant;Ljava/lang/Object;Z)V+511
j com.jacob.com.VariantUtilities.objectToVariant(Ljava/lang/Object;)Lcom/jacob/com/Variant;+248
j com.jacob.com.VariantUtilities.objectsToVariants([Ljava/lang/Object;)[Lcom/jacob/com/Variant;+19
j com.jacob.com.Dispatch.invoke(Lcom/jacob/com/Dispatch;Ljava/lang/String;I[Ljava/lang/Object;[I)Lcom/jacob/com/Variant;+8
j com.jacob.com.Dispatch.put(Lcom/jacob/com/Dispatch;Ljava/lang/String;Ljava/lang/Object;)V+18
j com.dt.iTunesController.ITPlaylist.addTrack(Lcom/dt/iTunesController/ITTrack;)V+19
j uk.co.teamnomad.itunes.WindowsLibraryImpl.savePlaylist(Ljava/util/List;Luk/co/teamnomad/itunes/PlayList;)V+46
j uk.co.teamnomad.bpm.main.Main.<init>(Luk/co/teamnomad/bpm/system/OperatingSystem;)V+309
j uk.co.teamnomad.bpm.main.Main.getInstance()Luk/co/teamnomad/bpm/main/Main;+16
j uk.co.teamnomad.bpm.main.Main.main([Ljava/lang/String;)V+8
v ~StubRoutines::call_stub
V [jvm.dll+0xecfac]
V [jvm.dll+0x1741d1]
V [jvm.dll+0xed02d]
V [jvm.dll+0xf5bf5]
V [jvm.dll+0xfd84d]
C [java.exe+0x2155]
C [java.exe+0x82ce]
C [kernel32.dll+0x44911]
C [ntdll.dll+0x3e4b6]
C [ntdll.dll+0x3e489]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.jacob.com.Variant.putVariantDispatch(Ljava/lang/Object;)V+0
j com.jacob.com.Variant.putObject(Ljava/lang/Object;)V+2
j com.jacob.com.VariantUtilities.populateVariant(Lcom/jacob/com/Variant;Ljava/lang/Object;Z)V+511
j com.jacob.com.VariantUtilities.objectToVariant(Ljava/lang/Object;)Lcom/jacob/com/Variant;+248
j com.jacob.com.VariantUtilities.objectsToVariants([Ljava/lang/Object;)[Lcom/jacob/com/Variant;+19
j com.jacob.com.Dispatch.invoke(Lcom/jacob/com/Dispatch;Ljava/lang/String;I[Ljava/lang/Object;[I)Lcom/jacob/com/Variant;+8
j com.jacob.com.Dispatch.put(Lcom/jacob/com/Dispatch;Ljava/lang/String;Ljava/lang/Object;)V+18
j com.dt.iTunesController.ITPlaylist.addTrack(Lcom/dt/iTunesController/ITTrack;)V+19
j uk.co.teamnomad.itunes.WindowsLibraryImpl.savePlaylist(Ljava/util/List;Luk/co/teamnomad/itunes/PlayList;)V+46
j uk.co.teamnomad.bpm.main.Main.<init>(Luk/co/teamnomad/bpm/system/OperatingSystem;)V+309
j uk.co.teamnomad.bpm.main.Main.getInstance()Luk/co/teamnomad/bpm/main/Main;+16
j uk.co.teamnomad.bpm.main.Main.main([Ljava/lang/String;)V+8
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x043a4800 JavaThread "MerapiBridgeSocket" [_thread_in_native, id=3664, stack(0x04800000,0x04850000)]
0x01f4c800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2440, stack(0x04160000,0x041b0000)]
0x01f47c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3628, stack(0x04110000,0x04160000)]
0x01f47400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3584, stack(0x040c0000,0x04110000)]
0x01f3ac00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2968, stack(0x04070000,0x040c0000)]
0x01ef8c00 JavaThread "Finalizer" daemon [_thread_blocked, id=3724, stack(0x04020000,0x04070000)]
0x01ef7800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3324, stack(0x03fd0000,0x04020000)]
=>0x01ed1400 JavaThread "main" [_thread_in_native, id=3756, stack(0x003b0000,0x00400000)]
Other Threads:
0x01ef6000 VMThread [stack: 0x01180000,0x011d0000] [id=2836]
0x01f5f000 WatcherThread [stack: 0x041b0000,0x04200000] [id=3528]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 960K, used 794K [0x24000000, 0x24100000, 0x244e0000)
eden space 896K, 81% used [0x24000000, 0x240b7510, 0x240e0000)
from space 64K, 95% used [0x240f0000, 0x240ff450, 0x24100000)
to space 64K, 0% used [0x240e0000, 0x240e0000, 0x240f0000)
tenured generation total 4096K, used 876K [0x244e0000, 0x248e0000, 0x28000000)
the space 4096K, 21% used [0x244e0000, 0x245bb318, 0x245bb400, 0x248e0000)
compacting perm gen total 12288K, used 4255K [0x28000000, 0x28c00000, 0x2c000000)
the space 12288K, 34% used [0x28000000, 0x28427cb8, 0x28427e00, 0x28c00000)
ro space 8192K, 63% used [0x2c000000, 0x2c519920, 0x2c519a00, 0x2c800000)
rw space 12288K, 53% used [0x2c800000, 0x2ce74dd0, 0x2ce74e00, 0x2d400000)
Dynamic libraries:
0x00400000 - 0x00424000 C:\Windows\system32\java.exe
0x771a0000 - 0x772c7000 C:\Windows\system32\ntdll.dll
0x75a20000 - 0x75afb000 C:\Windows\system32\kernel32.dll
0x75ee0000 - 0x75fa6000 C:\Windows\system32\ADVAPI32.dll
0x772e0000 - 0x773a3000 C:\Windows\system32\RPCRT4.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da8b000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x77060000 - 0x770fd000 C:\Windows\system32\USER32.dll
0x773b0000 - 0x773fb000 C:\Windows\system32\GDI32.dll
0x744f0000 - 0x74522000 C:\Windows\system32\WINMM.dll
0x76f30000 - 0x76fda000 C:\Windows\system32\msvcrt.dll
0x76d20000 - 0x76e64000 C:\Windows\system32\ole32.dll
0x75d20000 - 0x75dad000 C:\Windows\system32\OLEAUT32.dll
0x744b0000 - 0x744e9000 C:\Windows\system32\OLEACC.dll
0x77100000 - 0x7711e000 C:\Windows\system32\IMM32.DLL
0x76c00000 - 0x76cc8000 C:\Windows\system32\MSCTF.dll
0x75820000 - 0x7584c000 C:\Windows\system32\apphelp.dll
0x772d0000 - 0x772d9000 C:\Windows\system32\LPK.DLL
0x77120000 - 0x7719d000 C:\Windows\system32\USP10.dll
0x6d7b0000 - 0x6d7bc000 C:\Program Files\Java\jre6\bin\verify.dll
0x6d330000 - 0x6d34f000 C:\Program Files\Java\jre6\bin\java.dll
0x6d290000 - 0x6d298000 C:\Program Files\Java\jre6\bin\hpi.dll
0x75a10000 - 0x75a17000 C:\Windows\system32\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000 C:\Program Files\Java\jre6\bin\zip.dll
0x6d610000 - 0x6d623000 C:\Program Files\Java\jre6\bin\net.dll
0x76e70000 - 0x76e9d000 C:\Windows\system32\WS2_32.dll
0x75fb0000 - 0x75fb6000 C:\Windows\system32\NSI.dll
0x75030000 - 0x7506b000 C:\Windows\system32\mswsock.dll
0x75090000 - 0x75095000 C:\Windows\System32\wship6.dll
0x74cf0000 - 0x74cf5000 C:\Windows\System32\wshtcpip.dll
0x10000000 - 0x10019000 C:\Windows\System32\jacob-1.14.3-x86.dll
0x72640000 - 0x726db000 C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_d08b6002442c891f\MSVCR80.dll
0x76ea0000 - 0x76f24000 C:\Windows\system32\CLBCatQ.DLL
0x74db0000 - 0x74deb000 C:\Windows\system32\rsaenh.dll
VM Arguments:
java_command: bpm-0.0.13-jar-with-dependencies.jar
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=.;C:\Program Files\QuickTime\QTSystem\QTJava.zip
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\
USERNAME=ed
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows Vista Build 6001 Service Pack 1
CPU:total 1 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 2097151k(1656488k free), swap 4194303k(4092420k free)
vm_info: Java HotSpot(TM) Client VM (14.1-b02) for windows-x86 JRE (1.6.0_15-b03), built on Jul 25 2009 01:22:46 by "java_re" with MS VC++ 7.1
time: Mon Aug 31 20:14:48 2009
elapsed time: 7 seconds
我做错了什么?
How do I create a playlist in iTunes from Java, using COM (on windows i.e. no AppleScript)?
I have found a library here that does most of what I need, and I have added some code to ITPlaylist.java, to call the "AddTrack" method (mentioned in the docs) on the iTunes object ITPlaylist :
public void addTrack(ITTrack track) {
ITPlaylistKind k = getKind();
if (k == ITPlaylistKindUser) {
Dispatch.put(object, "AddTrack", track);
} else
throw new UnsupportedOperationException("can only add track to user playlists - kind : " + k);
}
But I get an error :
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000e150, pid=3184, tid=3896
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode, sharing windows-x86)
# Problematic frame:
# C [jacob-1.14.3-x86.dll+0xe150]
#
# An error report file with more information is saved as:
# Z:\\hs_err_pid3184.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
when I try and call this method. The log file contains:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000e150, pid=3040, tid=3756
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [jacob-1.14.3-x86.dll+0xe150]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x01ed1400): JavaThread "main" [_thread_in_native, id=3756, stack(0x003b0000,0x00400000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000005
Registers:
EAX=0x00000000, EBX=0x0490f6f8, ECX=0x003ffd8c, EDX=0x240b14e8
ESP=0x003ff9d0, EBP=0x003ffa14, ESI=0x01ed1510, EDI=0x00000005
EIP=0x1000e150, EFLAGS=0x00010246
Top of Stack: (sp=0x003ff9d0)
0x003ff9d0: 01ed1400 28404d90 28404d90 01fd9e27
0x003ff9e0: 01ed1510 003ffa28 003ffa24 01ed1400
0x003ff9f0: 2840bbaf 003ff9f4 00000000 003ffa28
0x003ffa00: 28409fb8 00000000 28404d90 00000000
0x003ffa10: 003ffa24 003ffa4c 01fd2da1 00000000
0x003ffa20: 01fd8259 240b14e8 240b39d8 003ffa2c
0x003ffa30: 2840401a 003ffa58 28409fb8 00000000
0x003ffa40: 28404040 003ffa24 003ffa54 003ffa7c
Instructions: (pc=0x1000e150)
0x1000e140: 1d 53 ff 15 20 01 01 10 66 c7 03 09 00 89 7b 08
0x1000e150: 8b 0f 8b 51 04 57 ff d2 5f 5e 5b c2 0c 00 6a ff
Stack: [0x003b0000,0x00400000], sp=0x003ff9d0, free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [jacob-1.14.3-x86.dll+0xe150]
j com.jacob.com.Variant.putObject(Ljava/lang/Object;)V+2
j com.jacob.com.VariantUtilities.populateVariant(Lcom/jacob/com/Variant;Ljava/lang/Object;Z)V+511
j com.jacob.com.VariantUtilities.objectToVariant(Ljava/lang/Object;)Lcom/jacob/com/Variant;+248
j com.jacob.com.VariantUtilities.objectsToVariants([Ljava/lang/Object;)[Lcom/jacob/com/Variant;+19
j com.jacob.com.Dispatch.invoke(Lcom/jacob/com/Dispatch;Ljava/lang/String;I[Ljava/lang/Object;[I)Lcom/jacob/com/Variant;+8
j com.jacob.com.Dispatch.put(Lcom/jacob/com/Dispatch;Ljava/lang/String;Ljava/lang/Object;)V+18
j com.dt.iTunesController.ITPlaylist.addTrack(Lcom/dt/iTunesController/ITTrack;)V+19
j uk.co.teamnomad.itunes.WindowsLibraryImpl.savePlaylist(Ljava/util/List;Luk/co/teamnomad/itunes/PlayList;)V+46
j uk.co.teamnomad.bpm.main.Main.<init>(Luk/co/teamnomad/bpm/system/OperatingSystem;)V+309
j uk.co.teamnomad.bpm.main.Main.getInstance()Luk/co/teamnomad/bpm/main/Main;+16
j uk.co.teamnomad.bpm.main.Main.main([Ljava/lang/String;)V+8
v ~StubRoutines::call_stub
V [jvm.dll+0xecfac]
V [jvm.dll+0x1741d1]
V [jvm.dll+0xed02d]
V [jvm.dll+0xf5bf5]
V [jvm.dll+0xfd84d]
C [java.exe+0x2155]
C [java.exe+0x82ce]
C [kernel32.dll+0x44911]
C [ntdll.dll+0x3e4b6]
C [ntdll.dll+0x3e489]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.jacob.com.Variant.putVariantDispatch(Ljava/lang/Object;)V+0
j com.jacob.com.Variant.putObject(Ljava/lang/Object;)V+2
j com.jacob.com.VariantUtilities.populateVariant(Lcom/jacob/com/Variant;Ljava/lang/Object;Z)V+511
j com.jacob.com.VariantUtilities.objectToVariant(Ljava/lang/Object;)Lcom/jacob/com/Variant;+248
j com.jacob.com.VariantUtilities.objectsToVariants([Ljava/lang/Object;)[Lcom/jacob/com/Variant;+19
j com.jacob.com.Dispatch.invoke(Lcom/jacob/com/Dispatch;Ljava/lang/String;I[Ljava/lang/Object;[I)Lcom/jacob/com/Variant;+8
j com.jacob.com.Dispatch.put(Lcom/jacob/com/Dispatch;Ljava/lang/String;Ljava/lang/Object;)V+18
j com.dt.iTunesController.ITPlaylist.addTrack(Lcom/dt/iTunesController/ITTrack;)V+19
j uk.co.teamnomad.itunes.WindowsLibraryImpl.savePlaylist(Ljava/util/List;Luk/co/teamnomad/itunes/PlayList;)V+46
j uk.co.teamnomad.bpm.main.Main.<init>(Luk/co/teamnomad/bpm/system/OperatingSystem;)V+309
j uk.co.teamnomad.bpm.main.Main.getInstance()Luk/co/teamnomad/bpm/main/Main;+16
j uk.co.teamnomad.bpm.main.Main.main([Ljava/lang/String;)V+8
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x043a4800 JavaThread "MerapiBridgeSocket" [_thread_in_native, id=3664, stack(0x04800000,0x04850000)]
0x01f4c800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2440, stack(0x04160000,0x041b0000)]
0x01f47c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3628, stack(0x04110000,0x04160000)]
0x01f47400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3584, stack(0x040c0000,0x04110000)]
0x01f3ac00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2968, stack(0x04070000,0x040c0000)]
0x01ef8c00 JavaThread "Finalizer" daemon [_thread_blocked, id=3724, stack(0x04020000,0x04070000)]
0x01ef7800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3324, stack(0x03fd0000,0x04020000)]
=>0x01ed1400 JavaThread "main" [_thread_in_native, id=3756, stack(0x003b0000,0x00400000)]
Other Threads:
0x01ef6000 VMThread [stack: 0x01180000,0x011d0000] [id=2836]
0x01f5f000 WatcherThread [stack: 0x041b0000,0x04200000] [id=3528]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 960K, used 794K [0x24000000, 0x24100000, 0x244e0000)
eden space 896K, 81% used [0x24000000, 0x240b7510, 0x240e0000)
from space 64K, 95% used [0x240f0000, 0x240ff450, 0x24100000)
to space 64K, 0% used [0x240e0000, 0x240e0000, 0x240f0000)
tenured generation total 4096K, used 876K [0x244e0000, 0x248e0000, 0x28000000)
the space 4096K, 21% used [0x244e0000, 0x245bb318, 0x245bb400, 0x248e0000)
compacting perm gen total 12288K, used 4255K [0x28000000, 0x28c00000, 0x2c000000)
the space 12288K, 34% used [0x28000000, 0x28427cb8, 0x28427e00, 0x28c00000)
ro space 8192K, 63% used [0x2c000000, 0x2c519920, 0x2c519a00, 0x2c800000)
rw space 12288K, 53% used [0x2c800000, 0x2ce74dd0, 0x2ce74e00, 0x2d400000)
Dynamic libraries:
0x00400000 - 0x00424000 C:\Windows\system32\java.exe
0x771a0000 - 0x772c7000 C:\Windows\system32\ntdll.dll
0x75a20000 - 0x75afb000 C:\Windows\system32\kernel32.dll
0x75ee0000 - 0x75fa6000 C:\Windows\system32\ADVAPI32.dll
0x772e0000 - 0x773a3000 C:\Windows\system32\RPCRT4.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da8b000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x77060000 - 0x770fd000 C:\Windows\system32\USER32.dll
0x773b0000 - 0x773fb000 C:\Windows\system32\GDI32.dll
0x744f0000 - 0x74522000 C:\Windows\system32\WINMM.dll
0x76f30000 - 0x76fda000 C:\Windows\system32\msvcrt.dll
0x76d20000 - 0x76e64000 C:\Windows\system32\ole32.dll
0x75d20000 - 0x75dad000 C:\Windows\system32\OLEAUT32.dll
0x744b0000 - 0x744e9000 C:\Windows\system32\OLEACC.dll
0x77100000 - 0x7711e000 C:\Windows\system32\IMM32.DLL
0x76c00000 - 0x76cc8000 C:\Windows\system32\MSCTF.dll
0x75820000 - 0x7584c000 C:\Windows\system32\apphelp.dll
0x772d0000 - 0x772d9000 C:\Windows\system32\LPK.DLL
0x77120000 - 0x7719d000 C:\Windows\system32\USP10.dll
0x6d7b0000 - 0x6d7bc000 C:\Program Files\Java\jre6\bin\verify.dll
0x6d330000 - 0x6d34f000 C:\Program Files\Java\jre6\bin\java.dll
0x6d290000 - 0x6d298000 C:\Program Files\Java\jre6\bin\hpi.dll
0x75a10000 - 0x75a17000 C:\Windows\system32\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000 C:\Program Files\Java\jre6\bin\zip.dll
0x6d610000 - 0x6d623000 C:\Program Files\Java\jre6\bin\net.dll
0x76e70000 - 0x76e9d000 C:\Windows\system32\WS2_32.dll
0x75fb0000 - 0x75fb6000 C:\Windows\system32\NSI.dll
0x75030000 - 0x7506b000 C:\Windows\system32\mswsock.dll
0x75090000 - 0x75095000 C:\Windows\System32\wship6.dll
0x74cf0000 - 0x74cf5000 C:\Windows\System32\wshtcpip.dll
0x10000000 - 0x10019000 C:\Windows\System32\jacob-1.14.3-x86.dll
0x72640000 - 0x726db000 C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_d08b6002442c891f\MSVCR80.dll
0x76ea0000 - 0x76f24000 C:\Windows\system32\CLBCatQ.DLL
0x74db0000 - 0x74deb000 C:\Windows\system32\rsaenh.dll
VM Arguments:
java_command: bpm-0.0.13-jar-with-dependencies.jar
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=.;C:\Program Files\QuickTime\QTSystem\QTJava.zip
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\
USERNAME=ed
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows Vista Build 6001 Service Pack 1
CPU:total 1 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 2097151k(1656488k free), swap 4194303k(4092420k free)
vm_info: Java HotSpot(TM) Client VM (14.1-b02) for windows-x86 JRE (1.6.0_15-b03), built on Jul 25 2009 01:22:46 by "java_re" with MS VC++ 7.1
time: Mon Aug 31 20:14:48 2009
elapsed time: 7 seconds
What am I doing wrong ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经有一段时间没有用 Java 做过任何 iTunes 的东西了,但是根据我的经验,我记得界面可能相当变化无常。
我没有任何明确的答案,但为了至少在黑暗中提供一个镜头,也许您应该尝试将您正在使用的 ITPlaylist 转换为 ITUserPlaylist (当然,如果这是正确的类型),然后调用其 addTrack 方法。这样您就可以使用库提供的功能,如果这不起作用,您可以与开发人员联系,因为可能会出现更严重的问题。
从您提供的转储来看,JACOB 中的底层 C 似乎正在尝试通过 iTunes COM 接口修改等效的 ITPlaylist。这可能是因为继承的运作方式? IE:ITPlaylist不支持addTrack(底层C试图调用一个不存在的函数),但ITUserPlaylist支持?只是一个想法。
建议更正:
同样,我当然不是这里的专家,所以如果有人有任何更好的想法,请继续并在我身上发帖:)
让我知道这是否会给您带来任何成功!
编辑
重新阅读我的文章后,我意识到我忘记了这种方法,这可能会更好,因为它使 JACOB COM 桥远离更高级别的东西:
I havent done any iTunes stuff in Java for a while, but from what experience I have I remember that the interface can be rather fickle.
I don't have any definitive answer, but in attempt to provide at least a shot in the dark, maybe you should try casting the ITPlaylist you're working with to an ITUserPlaylist (if that's the correct type, of course) and then calling its addTrack method. That way you'd be using the function provided by the library, and if that doesn't work you can get in touch with the developer because there may be a more serious problem occurring.
From the dump you provided, it looks as though the underlying C in JACOB is trying to modify the equivalent ITPlaylist via the iTunes COM interface. This could be because of the way the inheritance is working? IE: ITPlaylist doesn't support addTrack (the underlying C is trying to call a nonexistent function) but ITUserPlaylist does? Just a thought.
Suggested correction:
Again I'm certainly not the expert here so if anyone has any better ideas, please go ahead and post over me :)
Let me know if that offers you any success!
Edit
After re-reading my post, I realized I forgot this approach, which could arguably be better as it keeps the JACOB COM bridge out of the higher level stuff:
我的答案是联系我正在使用的库的开发人员,让他发布该库的新版本。如果您想这样做,那么至少使用版本 0.2,它将正确区分 ITPlaylist 对象和 ITUserPlaylist 对象,后者(正如 lurkingfridge79 所提到的,是唯一可以通过 COM API 添加曲目的播放列表类型。
The answer for me was to contact the developer of the library I was using, getting him to release a new version of the library. If you want to do this then use at least version 0.2, which will correctly differentiate between ITPlaylist objects and ITUserPlaylist ones, which (as mentioned by lurkingfridge79 are the only types of playlist that can have tracks added to them by the COM API.