Home > Mobile >  How to know in which platform was a jar file generated
How to know in which platform was a jar file generated

Time:03-04

I have a java jar file and I am trying to know in which platform (x86 or x64) it was generated for.

Basically I want to know if this jar file is x86 or x64.

How can I do this?

CodePudding user response:

Assuming this is a pure Java application without native dependencies, you don't need to know this. In fact, there is no such thing to determine as Java is compiled to a platform-independent byte-code for the Java Virtual Machine. It will work on any Java JVM (assuming it supports the target version of the compilation) irrespective of the underlying CPU platform.

Judging by your post history, you're used to working with C#/.NET, which compiles to x86/x64 or AnyCPU. Java has no such distinction. The only thing that is platform-dependent is the JVM and the JDK. Once compiled, your code can run on any CPU platform that has a JVM.

  • Related