[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3856
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

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.

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