Could not initialize class com.jacob.activeX.ActiveXComponent
来源:互联网 发布:博罗县网络问政中心 编辑:程序博客网 时间:2024/05/20 09:22
使用jacob调用Windows的com对象,将Word,Excel,PPT转换为pdf时遇到的问题: nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.jacob.activeX.ActiveXComponent] with root cause java.lang.NoClassDefFoundError: Could not initialize class com.jacob.activeX.ActiveXComponent
也就是这里报错了
ActiveXComponent app = new ActiveXComponent("PowerPoint.Application");
也就是这里报错了
ActiveXComponent app = new ActiveXComponent("PowerPoint.Application");
原因:
jacob(java com bridge,java com桥)分为两个部分,jacob.jar,jacob.dll,报这个错误 【无法初始化类com.jacob.activex.activexcomponent】是因为jacob.jar和jacob.dll的版本不一致。调用系统组件dll,通过这个com桥来操作com组件,最终完成对office文档的操作。解决办法
1、下载 对应版本的jacob.jar,jacob.dll,在工程中引入该版本jacob.jar包。
阅读全文
0 0
- Could not initialize class com.jacob.activeX.ActiveXComponent
- Java2Word报错Could not initialize class com.jacob.activeX.ActiveXComponent
- [ERROR]java.lang.NoClassDefFoundError: Could not initialize class com.jacob.activeX.ActiveXComponent
- Could not initialize class com.jacob.com.ComThread
- 恶心的jdcob--Could not initialize class com.jacob.com.ComThread
- 恶心的jdcob--Could not initialize class com.jacob.com.ComThread
- java.lang.NoClassDefFoundError: Could not initialize class com.jacob.com.ComThread
- Could not initialize class com.android.xml.AndroidXPathFactory解决办法
- Could not initialize class com.ali.unit.rule.Router
- Could not initialize class com.taobao.diamond.client.impl.DiamondEnvRepo
- NoClassDefFoundError: Could not initialize class
- Could not initialize class sun.awt.X11GraphicsEnvironment
- java.lang.NoClassDefFoundError: Could not initialize class
- Could not initialize class sun.awt.X11GraphicsEnvironment
- Could not initialize class sun.awt.X11GraphicsEnvironment
- Could not initialize class sun.awt.X11GraphicsEnvironment
- Could not initialize class android.widget.TextView
- Could not initialize class sun.awt.X11GraphicsEnvironment
- 自定义view 圆形进度条
- QT5.5 (post请求、MD5加密)
- Palindrome Number
- Apache访问控制之虚拟主机配置
- html加CSS总结
- Could not initialize class com.jacob.activeX.ActiveXComponent
- 递归算法
- 【入门篇】Activiti三种网关的绘制方法以及简单的用法
- 算法第四版约瑟夫问题队列实现
- LeetCode 647. Palindromic Substrings[Medium]
- 通过openwrt源码修改默认ip
- 蓝桥杯 算法训练 区间k大数查询
- (C++)二叉树的线索化 / 线索二叉树
- 初学mysql sever 笔记|主机与虚拟机在同一网段