网上有很多使用jacob来实现java打印excel的例子
<dependency>
<groupId>net.sf.jacob-project</groupId>
<artifactId>jacob</artifactId>
<version>1.14.3</version>
</dependency>
按照网上的说法,下载了jacob-1.14.3-x64.dll (跟你pom引入依赖的版本号要一致!) 放到 C:\Windows\System32
在调试阶段一切顺利,但在给客户部署的时候,却提示java报错,服务终止,以下是错误内容
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180012df1, pid=19752, tid=0x00000000000046a4
#
# JRE version: Java(TM) SE Runtime Environment (8.0_281-b09) (build 1.8.0_281-b09)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.281-b09 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [jacob-1.14.3-x64.dll+0x12df1]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/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 (0x000001bb18350000): JavaThread "http-nio-4041-exec-6" daemon [_thread_in_native, id=18084, stack(0x000000153b500000,0x000000153b600000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x000000001c0444c0
Registers:
RAX=0x000000001c0444c0, RBX=0x000000153b5fc858,
………
解决办法
不要用最新的jdk-8u281-windows-x64.exe,要下老版本!!
jdk-8u181、201、251什么的都可以,就是别用281
&spm=1001.2101.3001.5002&articleId=114274201&d=1&t=3&u=99aca44f0f9f4261b0552dba093d5f9e)
3440

被折叠的 条评论
为什么被折叠?



