I have a Java .class file. Now I want to check it was compiled on a 32 bit machine or 64 bit machine ? I tried file command but it just says it is a compiled java class. Is there any way to find it?

  • 2
    It seems that you should ask this question somewhere else e.g. stackoverflow.com.
    – Sam
    Apr 30, 2012 at 6:15

1 Answer 1


Java class files are platform independent. There are no "64bit class files", they are all the same format.

The things that can hinder portability of class files and libraries are:

  • required native code (this is obviously platform specific, including "bitness")
  • target version used to compile the classes (classes compiled for newer JVM targets cannot be loaded by older ones)

Other than that, you can compile your classes with a 32bit JDK and run them on a 64bit JVM (or the other way around) – it'll just work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .