|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.core.Jac
This is the main class of org.objectweb.jac. It launches a JAC container/server
that is called s0 by default.
If an application descriptor is given as a last parameter, it runs
the corresponding JAC program on the newly created JAC container by
using a customized class loader JacLoader
.
Use the following command to run MyApp.main()
with
arg1, ...
:
% java org.objectweb.jac.core.Jac [options] [app.jac arg1, ...] where 'app.jac' is a JAC application descriptor where options are: -r (release): JAC displays the release number -v (verbose): the JAC class loader is set to verbose -d (debug) : the JAC class loader is set to debugging mode -c (clean) : JAC cleans the tempory classes directory (previously created with 'write' option) -w (write) : the JAC class loader writes on disk all the translated classes (and use them for the next run) -V [server:]logname : set the log to verbose mode -L file : redirect all the logs to a file -D [name] (dist): JAC runs in distributed mode, i.e. it constructs a distributed JAC system. If no name is given, the default is s0. -M [name] : defines a master site where all the bytecode will be fetched (by default, classes are loaded from the local file system). -R dir : specify jac_root directory -G [gui,...] : launch a list of customized GUI -G app@server:[gui,...] : launch a list of customized GUIs with the swing GUI on a remote server for an application -A name : launches an administration GUI on a remote server called 'name' and do not start org.objectweb.jac. -W [gui[:port],...] : start the Web GUI server and provide access to some customized GUIs. -C: specify a particular classpath that will replace $CLASSPATH -a application aspect server : reload the configuration for an aspect on a server. -n application aspectClassName server aspectConfPath: create a new aspect on a server. -u application aspect server : unweave an aspect on a server. -x : redirect ouput to out.txt -h (help) : display the help.
JacLoader
Field Summary | |
static JacLoader |
classLoader
The Javassist class loader. |
static ClassLoader |
otherClasspath
alternative classpath, added with -C option |
Constructor Summary | |
Jac()
|
Method Summary | |
protected static void |
cleanDirectory(File dir)
This method is internally used to clean the cache directory of the translated classes (to use the cache, use the -w option and clean it with the -c option). |
static void |
displayLaunchingHelp()
Print the help (displayed when the -h option is set). |
static String |
getFullJavaVersion()
Returns the JRE version on which JAC is currently running. |
static String |
getJacRoot()
Returns the JAC root directory. |
static String |
getLaunchedClass()
Gets the name of the class that has been launched when JAC was started (in an autonomous or a distributed mode). |
static String |
getLaunchedProgram()
Returns the logical name of the program that was launched when the JAC system started. |
static String |
getMainJavaVersion()
Returns the main JRE version (only the 2 first numbers, e.g. 1.3 or 1.4) on which JAC is currently running. |
static String[] |
getStartSwingGUI()
Returns the array of of customized GUI ids to be shown with the Swing interface |
static Date |
getStartTime()
Returns the date when the JAC system was launched. |
static String[] |
getStartWebGUI()
Returns the array of of customized GUI ids to be made available on the web gui. |
static void |
main(String[] args)
The entry point of the JAC system. |
static void |
remoteReloadAspect(String application,
String server,
String aspect)
Reload an aspect on a remote server |
static void |
remoteSetTrace(String application,
String server,
String category,
int level)
Sets a trace loggin level on a remote server. |
static void |
remoteStartSwingGUI(String application,
String server,
String[] guiNames)
Starts a swing GUI on a remote server. |
static void |
remoteUnweaveAspect(String application,
String server,
String aspect)
|
static void |
remoteWeaveAspect(String application,
String server,
String aspect,
String aspectConfPath)
|
static void |
setJacRoot(String dir)
Sets the JAC root directory. |
static void |
setLaunchedClass(String className)
Sets the launched class. |
static void |
setStartSwingGUI(String[] start)
Tells the JAC system to start the GUI. |
static void |
setStartWebGUI(String[] customizedGUIs)
Tells the JAC system to start the GUI. |
static boolean |
startSwingGUI()
Tells if the JAC system must try to launch the GUI of the program is exist (see the -G option). |
static boolean |
startWebGUI()
Tells if the JAC system must try to launch the Web GUI of the program is exist (see the -G option). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static JacLoader classLoader
public static ClassLoader otherClasspath
Constructor Detail |
public Jac()
Method Detail |
public static String getFullJavaVersion()
public static String getMainJavaVersion()
public static Date getStartTime()
public static void main(String[] args) throws Throwable
Creates a JAC loader that will load the classes and translate them.
args
- the command-line options
Throwable
JacLoader
public static void remoteReloadAspect(String application, String server, String aspect) throws Exception
application
- the application for which to reload an aspectserver
- the name of the JAC server on which the application runsaspect
- the name of the aspect to reload
Exception
public static void remoteUnweaveAspect(String application, String server, String aspect) throws Exception
Exception
public static void remoteWeaveAspect(String application, String server, String aspect, String aspectConfPath) throws Exception
Exception
public static void remoteSetTrace(String application, String server, String category, int level) throws Exception
application
- the application for which to reload an aspectserver
- the name of the JAC server on which the application runscategory
- the trace categorylevel
- the trace level to set for the category
Exception
public static void remoteStartSwingGUI(String application, String server, String[] guiNames) throws Exception
application
- the application for which start the GUIserver
- the name of the JAC server on which the application runsguiNames
- the names of the GUI windows to start
Exception
public static void displayLaunchingHelp()
protected static void cleanDirectory(File dir)
dir
- the directory to cleanpublic static String getJacRoot()
The root directory is usually defined by an environment variable
that is set to $HOME/jac
where $HOME is the home
directory of the current user.
It can also be defined at launching time with the
-R
option.
setJacRoot(String)
public static void setJacRoot(String dir)
dir
- the path of the JAC root directorygetJacRoot()
public static String getLaunchedClass()
The launched class is the class that contains the static
run
method.
setLaunchedClass(String)
public static void setLaunchedClass(String className)
className
- the launched class namegetLaunchedClass()
public static String getLaunchedProgram()
The logical program name is by convention the package name of the class that runs the launched program.
For instance, if the command line is:
jac -c -D org.objectweb.jac.samples.agenda.Run
Then the launched program is org.objectweb.jac.samples.agenda
getLaunchedClass()
public static boolean startSwingGUI()
-G
option).If the program does not provides a GUI aspect, then the default GUI is launched.
setStartSwingGUI(String[])
public static boolean startWebGUI()
-G
option).If the program does not provides a Web GUI aspect, then the default GUI is launched.
setStartWebGUI(String[])
public static void setStartSwingGUI(String[] start)
startSwingGUI()
public static String[] getStartSwingGUI()
public static void setStartWebGUI(String[] customizedGUIs)
startWebGUI()
public static String[] getStartWebGUI()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |