• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3940
  • Last Modified:

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

TRIED RUNNING JAVA, GOT:

java.lang.ClassFormatError: Unknown constant tag 0 in class file
0
bob_hewitt
Asked:
bob_hewitt
  • 2
  • 2
  • 2
1 Solution
 
CEHJCommented:
Try recompiling
0
 
objectsCommented:
looks like its not a class file that you are running
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now