Usually programs in JVM COBOL projects use types that come from external artefacts like .class and .jar files. To successfully compile and build such a project, a JVM COBOL classpath must be set.
To define the classpath for a JVM COBOL project use the standard Project > Properties > Java Build Path > Libraries tab.
If you are developing a Java or JVM COBOL project, you do not have to set the Java installation directory using the JAVA_HOME variable. Follow these steps to identify the JRE using the Properties dialog boxes:
By default, Eclipse automatically recompiles all sources in your project every time you save the project or when you change the project or file properties. This, however, could mean a considerable overhead when you have large projects. To avoid this, you can configure your project to only build the sources that have changed since the last time the project was built. This is known as incremental building, you can specify that the project is built incrementally.
How you specify that a project is to be built incrementally depends on the type of project and are mutually exclusive:
You can enable the use of dynamic calls, which is equivalent to setting the ILDYNCALL Compiler directive that ensures that files in the project are compiled one at a time and that the build does not compile all files for one single compile command. It resolves calls to modules at run time rather than compile time; this has the effect of not requiring every module to be built.
Next time you make a change in the project, Eclipse only rebuilds the files that have changed.
You can force a complete rebuild of the project manually by selecting Project > Clean.
Micro Focus recommends that you clean your project and build before packaging for distribution.
To enable incremental builds for JVM COBOL projects that use namespaces, you need to specify the Use incremental build (Technical preview feature) setting. This is equivalent to setting the ILINCREMENTALBUILD Compiler directive. When this directive is specified, Eclipse only recompiles programs that have changed and programs that refer to types or programs within those programs that have changed. Incremental builds will only take effect once you have a clean build environment with no errors. Having build errors will result in a failure to generate class files, a full build will continue until the errors are resolved.
Next time you make a change in the project, Eclipse only rebuilds the files that have changed.
The build also creates a directory within the project output directory called JVMDependencies that stores dependency information for all the programs in your project. The JVMDependencies folder is not intended for distribution. If you want to package the contents of the output directory into a jar file, Micro Focus recommends that you turn off the incremental build feature and do a full clean rebuild.
You can force a complete rebuild of the project manually by selecting Project > Clean.
Micro Focus recommends that you clean your project and build before packaging for distribution.