


Note: if a manifest is given, it must contain a version attribute, otherwise the manifest in the JAR will be empty. If the manifest file is not specified or does not exist, a default manifest will be created in the JAR. The file path to a manifest can be given, this one will be stored in the JAR, in the MANIFEST.MF file in META-INF folder. It can be paths to JAR files or paths to directories containing Java compiled classes. The build dependencies can be specified by setting the classPaths argument. The only requirement is that one package name at least must be declared, and each of the Java classes should belong to a package. Ilib_build_jar can be used to create a JAR file with several packages, with any desired file name. Each class location in the tree corresponds to its package declaration in the source. The Java package is usually organized in a class directory tree, and has a hierarchical naming pattern something like, which the class directory tree follows. The following Java conventions should be followed when using ilib_build_jar.Ī JAR file usually contains one package only, and its file name is often the same as the package. ilib_build_jar relies on the jcompile function for compilation, and jcreatejar for JAR creation, no external tool is needed. Then the JAR file specified in jarFilePath is created from all the compiled classes of all the packages declared in packageNames. All the Java sources found in the given source directory paths sourcePaths are compiled. jar), which contains Java compiled packages (a Java package contains a set of classes sharing the same purpose), and a manifest file (to describe its content). A library in Java is a JAR file (Java archive, extension is. In other words, ilib_build_jar allows to build Java libraries from a set of Java sources. Ilib_build_jar extends ilib_build, which purpose is to build C/C++/Fortran libraries, to Java.
