helma.main.launcher
Class Main

java.lang.Object
  extended by helma.main.launcher.Main

public class Main
extends java.lang.Object

Helma bootstrap class. Basically this is a convenience wrapper that takes over the job of setting the class path and helma install directory before launching the static main(String[]) method in helma.main.Server. This class should be invoked from a jar file in the Helma install directory in order to be able to set up class and install paths.


Field Summary
static java.lang.String[] jars
           
 
Constructor Summary
Main()
           
 
Method Summary
static java.lang.ClassLoader createClassLoader(java.lang.String installDir)
          Create a server-wide ClassLoader from our install directory.
static java.lang.String getInstallDir(java.lang.String[] args)
          Get the Helma install directory from the command line -i argument or from the Jar URL from which this class was loaded.
static void main(java.lang.String[] args)
          Helma boot method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jars

public static final java.lang.String[] jars
Constructor Detail

Main

public Main()
Method Detail

main

public static void main(java.lang.String[] args)
Helma boot method. This retrieves the Helma home directory, creates the classpath and invokes main() in helma.main.Server.

Parameters:
args - command line arguments

createClassLoader

public static java.lang.ClassLoader createClassLoader(java.lang.String installDir)
                                               throws java.net.MalformedURLException
Create a server-wide ClassLoader from our install directory. This will be used as parent ClassLoader for all application ClassLoaders.

Parameters:
installDir -
Returns:
the main classloader we'll be using
Throws:
java.net.MalformedURLException

getInstallDir

public static java.lang.String getInstallDir(java.lang.String[] args)
                                      throws java.io.IOException,
                                             java.net.MalformedURLException
Get the Helma install directory from the command line -i argument or from the Jar URL from which this class was loaded. Additionally, the System property "helma.home" is set to the install directory path.

Parameters:
args -
Returns:
the base install directory we're running in
Throws:
java.io.IOException
java.net.MalformedURLException


Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.