org.scala_tools.maven.executions
Class MainHelper

java.lang.Object
  extended by org.scala_tools.maven.executions.MainHelper

public class MainHelper
extends Object

Author:
David Bernard

Constructor Summary
MainHelper()
           
 
Method Summary
static File createArgFile(List<String> args)
          Creates a file containing all the arguments.
static String locateJar(Class<?> c)
           
static List<String> readArgFile(File argFile)
          Creates a file containing all the arguments.
static void runMain(String mainClassName, List<String> args, ClassLoader cl)
          Runs the main method of a java class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainHelper

public MainHelper()
Method Detail

createArgFile

public static File createArgFile(List<String> args)
                          throws IOException
Creates a file containing all the arguments. This file has a very simple format of argument (white-space argument).

Returns:
Throws:
IOException

readArgFile

public static List<String> readArgFile(File argFile)
                                throws IOException
Creates a file containing all the arguments. This file has a very simple format of argument (white-space argument).

Returns:
Throws:
IOException

runMain

public static void runMain(String mainClassName,
                           List<String> args,
                           ClassLoader cl)
                    throws Exception
Runs the main method of a java class

Throws:
Exception

locateJar

public static String locateJar(Class<?> c)
                        throws Exception
Throws:
Exception


Copyright © 2009-2010 Scala Tools. All Rights Reserved.