exjld — Java Binary Linker tool
exjld is Enduro/X Java linker tool. The tool is used to compile given jar files into single executable binary. exjld basically extracts all jar files, converts them to C resources (statically initialized byte arrays). These byte array global variables are indexed by class names. The application then is started by custom class loader which from JNI side pulls is the classes necessary. Basically by using this tool, the developer can distributed Java programs with zero dependencies, except the fact that JDK and Enduro/X libraries must be installed on system. All other depended JARs are compiled statically into single executable. This can greatly help to improve product development and streamline the product delivery to the customer. As the all logic is encapsulated into autonomous binary. Thus at the production, the target system can be composed of different such kind of binaries, where each of them can depend on different set or version of the third party Jar libs.
exjld linker normally links the binary two times. First time it does the test when class loader is instructed to load main class. If loading succeed, then linker re-links the binary with the final mode which includes the execution of the main class after it is loader.
exjld must have access to cc (C Compiler). exjld by default calls Enduro/X buildserver utility used for compiling sources and linking with Enduro/X libs. Also program uses jar tool for extracting the jar files. The class files to C resources are converted by exembedfile(8) utility.