I want to write CD/DVD Burning Program in Java. After searching I found this Solution given over here. I followed it but when I run this program I got error :
Exception in thread "main" com4j.ExecutionException: com4j.ComException: 80040111 CoCreateInstance failed : ClassFactory cannot supply requested class : .\com4j.cpp:153
at com4j.ComThread.execute(ComThread.java:203)
at com4j.Task.execute(Task.java:25)
at com4j.COM4J.createInstance(COM4J.java:97)
at com4j.COM4J.createInstance(COM4J.java:72)
at com.ms.imapi2.ClassFactoryExt.createMsftDiscFormat2Data(ClassFactoryExt.java:16)
at com.ms.main.MainClass.main(MainClass.java:19)
Caused by: com4j.ComException: 80040111 CoCreateInstance failed : ClassFactory cannot supply requested class : .\com4j.cpp:153
at com4j.Native.createInstance(Native Method)
at com4j.COM4J$CreateInstanceTask.call(COM4J.java:117)
at com4j.COM4J$CreateInstanceTask.call(COM4J.java:104)
at com4j.Task.invoke(Task.java:51)
at com4j.ComThread.run0(ComThread.java:153)
at com4j.ComThread.run(ComThread.java:134)
Note I am running this program on 64bit Windows 7 with 64bit JVM.
What I tried to solve :
1) I registered com4j.dll
using regsvr32
2) Added com4j.dll
as Native libraries of com4j.jar
Is there problem in Code or Something else I have to do to make this run.