public class JarRegistrar extends JarValidation
meta-inf\Basis.keyin that jar. If BBj does not find
Basis.keyin the jar file, it will nag the user with a message indicating that the jar has not been registered. The
JarRegistrarclass can be used to register a non-registered jar or to re-register an already registered jar. The
Basis.keyfile contains two types of information: the BASIS License version that was current at the time the jar was registered and index values that BBj uses to determine whether the jar has been modified since it was registered. If a registered Jar is modified by adding, removing or modifying any of the files in the jar then the registration will no longer be valid and the Jar should be re-registered.
Basis.keyinformation in the Jar and compares the license version of BBjServices with the license version found in the registered Jar. If the major version found in
Basis.keyis greater than the major license version for BBjServices then the registration is considered to be invalid and the user will receive a nag message. For example, if a jar has been registered for an 8.0 license then that registration will be valid for all future versions of BBj. But if a jar has been registered for a 9.0 license then that jar would be valid for BBjServices running with a 9.0 or later license but would not be valid for a BBjServices running with an 8.0 license.
|Constructor and Description|
|Modifier and Type||Method and Description|
Allows commandline invocation of JarRegistrar.
Creates a new Jar file with the name outputJarName that contains the same manifest and the same set of files as are found in inputJarFile but that also contains the file meta-inf\Basis.key.
public static java.lang.String registerJar(java.lang.String p_sourceJarName, java.lang.String p_destinationJarName) throws java.lang.reflect.InvocationTargetException, BBjException
p_sourceJarName- The path to a Jar file which is to be registered. This name should be an absolute path to the Jar since any relative path will be relative to the working directory of the JVM and not relative to the working directory set by CHDIR.
p_destinationJarName- The path to the output file which will be a registered copy of the input Jar. For the same reasons as specified for inputJarName, the user should use an absolute path for outputJarName. Specifying the same path for outputJar as InputJar will result in the following IOException.
public static void main(java.lang.String args) throws java.lang.reflect.InvocationTargetException, BBjException
inputJarFile, and are the first and second arguments respectively. main creates a new jar file with the name
outputJarNamethat contains the same manifest and the same set of files as are found in
inputJarFilebut that also contains the file
meta-inf\Basis.key. In order to create the output file, the main method must be able to access the internet and connect to the BASIS WebService.The following jars must be in Java's classpath:
jwsdp.jar, which are located at
<BBj Install Path>/lib.