Java COBOL applications running on a 64-bit platform can use either the 32-bit or the 64-bit
JVM.
To set the platform to 64-bit, follow this procedure, which changes the JRE Library specified in the JVM Build Path:
- Right-click the project on the COBOL Explorer; then select
Properties.
- Expand
Micro Focus; then click
JVM Build Path.
- On the
Libraries tab, click
Add library.
- Select
JRE System Library; then click
Next.
- Select
Alternate JRE.
- If your 64-bit JRE is listed on the drop-down list, select it; if not, click
Installed JREs and use the Preferences dialog box to add or find your 64-bit JRE library.
- On the
JRE System Library wizard, click
Finish to add the JRE library to the JVM Build Path.
Note: Optionally, use the
Order and Export tab to remove any unwanted JREs or to change the order in which JREs are accessed.
Most COBOL programs can run on 64-bit systems without recompilation. However, there are some cases where you need to ensure that COBOL pointer items in your application are allocated as 64 bits in size rather than the default of 32 bits. To do this you set the project property
Generate 64-bit Pointers.
You need to generate 64-bit pointers when:
- The combined data of all the programs in your application requires more than a 32-bit address space
- Your managed COBOL is calling native COBOL on the 64-bit
JVM and the managed COBOL is passing parameters that contain structures with pointers
If your application uses native COBOL code, and you need to execute that code on a 64-bit
JVM, you need to ensure it is recompiled to target the appropriate 64-bit processor.