tags:

views:

129

answers:

2
+2  Q: 

64 bits ant.jar

I have installed 64 bits RHEL. I have following questions regarding ant.jar for the system.

  1. I was not able to find ant.jar build with 64 bit JVM from the apache website. Do I have to build it form the source code, if I intend to run the jar on 64 bit JVM?
  2. Would it speed up the build process if I use ant.jar build with 64 bit JVM and run it on 64 bit JVM?
+1  A: 

No, java bytecode is java bytecode, it doesn't matter whether it was built with a 32-bit or 64-bit JDK.

For the same reason, it doesn't matter which operating system it was built on either. For example: a jar built with a 32-bit JDK on 32-bit Microsoft Windows should run just fine on a 64-bit JRE on 64-bit RHEL.

richj
Do you mean to say that any java source code when compiled using 32 bit JDK would run 64 bit JRE?
Amit S
That is what we are saying.
Stephen C
+3  A: 

You do not need a special 64 bit build of a pure Java application such as Ant. The ant.jar will run equally on a 32 bit or 64 bit JVM.

The only cases where you would definitely need to run a 64 bit version of a Java application are:

  • when the application includes native code libraries; i.e. the application is not pure Java, or
  • when the Java application has been compiled directly to native code; e.g. using gcj.

(It is possible that a poorly written application will be operating system dependent. For example, someone could hard code an application to use OS-specific line separators or pathnames, or to rely on specific OS-specific external commands. But the chances are that this won't make the application dependent on the OS memory model.)

Stephen C