Reputation: 34770
We started from 32bit windows. The Java application will be packed with JRE and use this packed JRE. Now we need to support 64bit and linux. I am looking for a way to create releases for them. Is there any difference between the following two options:
Option 1:
Build the source with 32bit windows JDK (in a 32bit windows machine) and pack different JRE for 32bit/64bit and Windows/Linux;
Option 2:
Build with corresponding JDK for 32bit/64bit and/or windows/Linux (that is build 64bit windows application with 64bit windows JDK)
Option 1 is simpler in release process but I don't know is there any potential issues (error, performance). Option 2 may require 4 different machines just for the release.
Anyother question is what will happen if I build a Java application with 64bit JDK and run it in a 32bit machine with 32bit JRE? I will find a machine to try it out later.
Upvotes: 1
Views: 319
Reputation:
You can exec a command line command specifying the amount of RAM used depending on the architechture
Upvotes: 0
Reputation: 12206
The transformation of java source to bytecode with javac
is architecture independent. Meaning option 1 should be fine.
Upvotes: 3
Reputation: 53694
compiled java code is not specific to any architecture. you can compile it once on any computer and distribute it as is (pairing it with an appropriate jre if need be).
Upvotes: 4