sun.zip.disableMemoryMapping
2018-02-11 14:22
1101 查看
有时候你如果修改了JVM正在load的jar文件,会导致JVM crash。stacktrace是在java.util.zip.ZipFile.getEntry() 时发生的。
There are three possible scenarios here:
1. While a class is in use it is dynamically reloaded from a jar file.
2. While a jar file is being accessed by the class loader, the jar file is being modified.
3. A Jarfile which was bigger than 4GB was accessed (applies to Java 6 and earlier only)
那么解决办法就是要确保当JVM在装载jar文件的时候,jar文件不要被其它程序更新或者修改。后来JVM就引入了一个新的性质sun.zip.disableMemoryMapping,如果在JVM启动时加上参数-Dsun.zip.disableMemoryMapping=true,然后JVM在遇到这种情况下的时候就不crash。
当然不能过度依赖这个性质,因为jar文件在被load的时候被更新可能会导致程序执行异常,更容易出bug等问题。
原文:http://blog.csdn.net/hongchangfirst/article/details/78950369作者:hongchangfirsthongchangfirst的主页:http://blog.csdn.net/hongchangfirst
There are three possible scenarios here:
1. While a class is in use it is dynamically reloaded from a jar file.
2. While a jar file is being accessed by the class loader, the jar file is being modified.
3. A Jarfile which was bigger than 4GB was accessed (applies to Java 6 and earlier only)
那么解决办法就是要确保当JVM在装载jar文件的时候,jar文件不要被其它程序更新或者修改。后来JVM就引入了一个新的性质sun.zip.disableMemoryMapping,如果在JVM启动时加上参数-Dsun.zip.disableMemoryMapping=true,然后JVM在遇到这种情况下的时候就不crash。
当然不能过度依赖这个性质,因为jar文件在被load的时候被更新可能会导致程序执行异常,更容易出bug等问题。
原文:http://blog.csdn.net/hongchangfirst/article/details/78950369作者:hongchangfirsthongchangfirst的主页:http://blog.csdn.net/hongchangfirst
相关文章推荐
- weblogic jvm -Dsun.zip.disableMemoryMapping=true
- kernel mappings of high-memory page frames
- MMF (memory mapping file)
- Mapping memory efficiently
- Sun Microsystems Java GIF File Parsing Memory Corruption Vulnerability Prove Of Concept Exploit
- MemoryMappingFile泄漏分析过程
- 为什么sun的JDK不提供更新zip文件内容的方法?
- Windows XP considers zip as folder, how to disable this?
- eXtremeDB shared memory mapping
- phpZip与faisun_unzip-两个好用的在线解压缩工具
- Linux Device Drivers 3rd Edition Memory Mapping and DMA
- [Android Memory] Android Zipalign zip对齐优化app程序
- 内存映射文件(Memory Mapping File)
- Multiple address space mapping technique for shared memory wherein a processor operates a fault handling routine upon a translator miss
- Linux Memory Mapping
- ZZ - Mapping Pointers and Sharing Memory between Processes: Windows CE 5.0 vs. Windows Embedded CE 6.0
- Creating a ZIP Archive in Memory Using System.IO.Compression
- enable/disable WinXP's zip support
- Java Code Examples for com.sun.jna.Memory
- URLClassloader->sun.misc.InvalidJarIndexException&java.util.zip.ZipException