Solved

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

Posted on 2007-11-20
6
3,613 Views
Last Modified: 2013-11-23
TRIED RUNNING JAVA, GOT:

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

Expert Comment

by:CEHJ
ID: 20323492
Try recompiling
0
 
LVL 92

Accepted Solution

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

Author Closing Comment

by:bob_hewitt
ID: 31427384
Turns out I had used 'text' mode rather than 'binary' mode, when copying the class files from Windows to Unix. Thanks!
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 86

Expert Comment

by:CEHJ
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?
0
 

Author Comment

by:bob_hewitt
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.
0
 
LVL 92

Expert Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Maven Project: Hibernate Dependencies Conflict 10 40
oracle 11g 23 107
Oracle SQL syntax check  without executing 6 76
Unhandled exception type Exception 18 43
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This video teaches viewers about errors in exception handling.

821 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