在通过文件上传之后,运行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模式的,改变上传文件的模式之后问题获得了解决!

最新文章

  1. Codeforces Round #342 (Div 2) 解题报告
  2. sublime text 3.0使用
  3. TCP11种状态分析和测试
  4. Swift进阶
  5. C++ Primer 读书笔记 第2章 变量和基本类型
  6. centos6.4-x86-64系统更新系统自带Apache Http Server
  7. C#控件系列--文本类控件
  8. IOCP模型与网络编程
  9. SVN在branch兼并和游戏patch(1)
  10. 基于规则评分的密码强度检测算法分析及实现(JavaScript)
  11. (七)SpringBoot2.0基础篇- application.properties属性文件的解析及获取
  12. c++-pimer-plus-6th-chapter05
  13. 简单说明一下Token ,Cookie,Session
  14. swift - 听云监测(Testin - Bugout) - 集成
  15. zabbix实现企业微信监控报警
  16. Android DatePickerDialog使用案例
  17. AIX 7命令行weblogic建域流水
  18. springcloud 熔断处理
  19. vue - 路由传递参数
  20. python中heapq堆的讲解

热门文章

  1. 在 CentOS 7上安装并配置 Python 3.6 环境
  2. [Swift通天遁地]五、高级扩展-(9)颜色、设备、UserDefaults、URL等扩展方法
  3. Akka源码分析-Remote-Actor创建
  4. Django 内容回顾
  5. 【洛谷2926/BZOJ1607】[USACO08DEC]Patting Heads拍头(筛法)
  6. 【Leetcode】115. Distinct Subsequences
  7. Product Device Lot
  8. React容器组件和展示组件
  9. Android常用的Dialog对话框用法
  10. cms中某些标题链接的单独写法