The IDE runs a Clean command before each build that deletes all .class files in the output folder of the JVM COBOL project.
Usually, programs in JVM COBOL projects use types that come from external artefacts like .class and .jar files. To successfully compile and build such projects, you must set a JVM COBOL classpath. You set this in the projects' properties on the Libraries tab in Micro Focus > Java Build Path.
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 box:
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.
In Visual COBOL, you can specify that a JVM COBOL project is built incrementally. How you specify this depends on the following:
To enable this feature, 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.
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.
To enable dynamic calls:
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.