jcolibri.util
Class Launcher

java.lang.Object
  extended by jcolibri.util.Launcher

public class Launcher
extends java.lang.Object

This class launches a jCOLIBRI application loading dinamically its libraries. It has a method that parses the ".classpath" file of the eclipse project to find the libraries that a project needs. Then it loads the libraries and executes an application. This eases the process of invoking a jCOLIBRI application.

Version:
2.0
Author:
Juan A. Recio Garcia

Constructor Summary
Launcher()
           
 
Method Summary
static void addURLtoClassLoader(java.net.URL u)
          Loads a resource pointed by a URL into the Class Loader.
protected static java.net.URL[] getClassPath(java.lang.String classpathfile)
          Parses a eclipse classpath file returning a list of URLs to the libraries in that file.
static void main(java.lang.String[] args)
          Main method used to launch any application loading the libraries from a eclipse classpath file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Launcher

public Launcher()
Method Detail

main

public static void main(java.lang.String[] args)
Main method used to launch any application loading the libraries from a eclipse classpath file. The first argument must be the class to launch and the second (optional) is the name of the eclipse classpath file. If this second argument is not specified it tries with ".classpath".


addURLtoClassLoader

public static void addURLtoClassLoader(java.net.URL u)
                                throws java.io.IOException
Loads a resource pointed by a URL into the Class Loader.

Throws:
java.io.IOException

getClassPath

protected static java.net.URL[] getClassPath(java.lang.String classpathfile)
                                      throws java.lang.Exception
Parses a eclipse classpath file returning a list of URLs to the libraries in that file.

Throws:
java.lang.Exception

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es