ava.lang.ClassFormatError: Unknown constant tag 0 in class file

Posted on 2007-11-20
Last Modified: 2013-11-23

java.lang.ClassFormatError: Unknown constant tag 0 in class file
Question by:bob_hewitt
  • 2
  • 2
  • 2
LVL 86

Expert Comment

ID: 20323492
Try recompiling
LVL 92

Accepted Solution

objects earned 125 total points
ID: 20323563
looks like its not a class file that you are running

Author Closing Comment

ID: 31427384
Turns out I had used 'text' mode rather than 'binary' mode, when copying the class files from Windows to Unix. Thanks!
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

LVL 86

Expert Comment

ID: 20324064
>>looks like its not a class file that you are running

You won't get that error message from a file that's not a class file. And if you did, why would you be trying to run something that's *not* a class file?

Author Comment

ID: 20324318
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.)

QED  Thanks again, folks.
LVL 92

Expert Comment

ID: 20324387
that would do it, the reulting file would then no longer be as valid class file

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now