Package org.ringojs.tools.launcher
Class Main
- java.lang.Object
-
- org.ringojs.tools.launcher.Main
-
public class Main extends java.lang.Object
Main launcher class. This figures out the Ringo home directory, sets up the classpath, and launches one of the Ringo tools.
-
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.ClassLoader
createClassLoader(java.io.File home)
Create a server-wide ClassLoader from our install directory.void
destroy()
static java.io.File
getRingoHome()
Get the Ringo install directory.void
init(java.lang.String[] args)
static void
main(java.lang.String[] args)
Ringo main method.void
start()
void
stop()
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Ringo main method. This retrieves the Ringo home directory, creates the classpath and invokes main() in one of the ringo tool classes.- Parameters:
args
- command line arguments
-
init
public void init(java.lang.String[] args)
-
start
public void start()
-
stop
public void stop()
-
destroy
public void destroy()
-
createClassLoader
public static java.lang.ClassLoader createClassLoader(java.io.File home) 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:
home
- the ringo install directory- Returns:
- the main classloader we'll be using
- Throws:
java.net.MalformedURLException
-
getRingoHome
public static java.io.File getRingoHome() throws java.io.IOException
Get the Ringo install directory.- Returns:
- the base install directory we're running in
- Throws:
java.io.IOException
- an I/O related exception occurredjava.net.MalformedURLException
- the jar URL couldn't be parsed
-
-