pool
Class JarRunner
java.lang.Object
|
+--java.lang.Thread
|
+--pool.JarRunner
- public class JarRunner
- extends Thread
Runs a jar application under SecurityManager.
Constructor Summary |
JarRunner(String alias,
String path)
Creates a JarClassLoader for a jar application from any url.
|
Method Summary |
static void |
main(String[] args)
Starts the Gateway agent. |
void |
run()
Starts a thread of excecution for the current Jar.
|
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
JarRunner
public JarRunner(String alias,
String path)
throws Exception
- Creates a JarClassLoader for a jar application from any url.
Then, it gets the application MainClass.
- Throws:
- Exception -
- MalformedURLException - If the specified path if an invalid URL
- IOException - If any error occurs while loading the Jar file
- See Also:
- Associates the thread with its corresponding group.,
#ThreadsControll.associate()
run
public void run()
- Starts a thread of excecution for the current Jar.
It first installs the SeurityManager class and then loads the Jar classes.
- Throws:
- ClassNotFoundException - If the Jar Main-Class is not found
- NoSuchMethodException - If the Main-Class doen not define a main method
- InvocationTargetException -
- Overrides:
- run in class Thread
- See Also:
SecurityManager
main
public static void main(String[] args)
throws Exception
- Starts the Gateway agent.
- Throws:
- Exception -