java.lang.ClassFormatError: Unknown constant tag 0 in class file
2024-08-31 03:05:34
在通过文件上传之后,运行java程序,突然发现这么一个错误:java.lang.ClassFormatError: Unknown constant tag 0 in class file,通过网上查找,很多人认为是要重新编译,可是按照这个方法重新编译之后还是得到同样的结果!百思不得其解!
最后通过:
Maybe it's yet to appear, but I found (and replied) that it was due to an SCP file transfer (of a binary 'class' file) in ascii mode from Windows to Unix.
(1) I did a hex dump of the files on their respective computers, and the two copies of the same class file differed.
(2) I did the transfer again in binary mode and the class file now works. (and, the two files no longer differ.)
获得答案,就是在上传类文件的时候使用了ASCII的模式,而java编译之后的类文件是需要采用binary模式的,改变上传文件的模式之后问题获得了解决!
最新文章
- Codeforces Round #342 (Div 2) 解题报告
- sublime text 3.0使用
- TCP11种状态分析和测试
- Swift进阶
- C++ Primer 读书笔记 第2章 变量和基本类型
- centos6.4-x86-64系统更新系统自带Apache Http Server
- C#控件系列--文本类控件
- IOCP模型与网络编程
- SVN在branch兼并和游戏patch(1)
- 基于规则评分的密码强度检测算法分析及实现(JavaScript)
- (七)SpringBoot2.0基础篇- application.properties属性文件的解析及获取
- c++-pimer-plus-6th-chapter05
- 简单说明一下Token ,Cookie,Session
- swift - 听云监测(Testin - Bugout) - 集成
- zabbix实现企业微信监控报警
- Android DatePickerDialog使用案例
- AIX 7命令行weblogic建域流水
- springcloud 熔断处理
- vue - 路由传递参数
- python中heapq堆的讲解
热门文章
- 在 CentOS 7上安装并配置 Python 3.6 环境
- [Swift通天遁地]五、高级扩展-(9)颜色、设备、UserDefaults、URL等扩展方法
- Akka源码分析-Remote-Actor创建
- Django 内容回顾
- 【洛谷2926/BZOJ1607】[USACO08DEC]Patting Heads拍头(筛法)
- 【Leetcode】115. Distinct Subsequences
- Product Device Lot
- React容器组件和展示组件
- Android常用的Dialog对话框用法
- cms中某些标题链接的单独写法