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

TRIED RUNNING JAVA, GOT:

java.lang.ClassFormatError: Unknown constant tag 0 in class file
bob_hewittAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
objectsConnect With a Mentor Commented:
looks like its not a class file that you are running
0
 
CEHJCommented:
Try recompiling
0
 
bob_hewittAuthor Commented:
Turns out I had used 'text' mode rather than 'binary' mode, when copying the class files from Windows to Unix. Thanks!
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
CEHJCommented:
>>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
 
bob_hewittAuthor Commented:
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
 
objectsCommented:
that would do it, the reulting file would then no longer be as valid class file
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.