public class launchClient
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Properties |
clientContainerProps
Internal use - global area for
launch() api |
static java.lang.Exception |
launchException
Internal use - global area for
launch() api |
Constructor and Description |
---|
launchClient() |
public static java.util.Properties clientContainerProps
launch()
apipublic static java.lang.Exception launchException
launch()
apipublic void launch(java.lang.String filename, java.util.Properties p, java.lang.String[] argv) throws com.ibm.websphere.client.applicationclient.ClientContainerException, java.lang.IllegalArgumentException, javax.naming.NamingException, java.io.IOException, java.util.zip.ZipException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
The Properties parameter is for setting Application Client runtime properties. The list of valid properties is:
Here's a programming example:
FileInputStream fis = new FileInputStream("c:\\production\\myapp.properties");
Properties p = new Properties();
p.load(fis);
p.setProperty("verbose", "true");
p.setProperty("classpath", "c:\abc\def.jar;c:\mystuff.jar");
String myargs[] = {"-store=12345", "-unit=#77211", "-verbose", "minneapolis"};
launchClient lc = new launchClient();
lc.launch("c:\\production\\myapp.ear", p, myargs);
filename
- The .ear file with the Application Client to launch.
p
- A list of properties intended for the Application Client runtime.
argv
- A list of arguments to pass directly to the client application being launched.
These arguments are ignored by WebSphere.
ClientContainerException
- This is a generic exception for the J2EE Application Client runtime. Refer to the help for the message embedded in the exception.
java.lang.IllegalArgumentException
- Thrown if a bad argument is passed to launch.
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException
- Thrown if an error occurs while opening the .ear file.
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.NoModuleElementException
- Thrown if an error occurs while opening the Application Client file.
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
- Thrown if an error occurs while saving the .ear file to the temporary directory.
com.ibm.websphere.client.applicationclient.NoMainClassException
- Thrown if the manifest in the client application .jar file does not indicate the name of the main class to launch.
javax.naming.NamingException
- Thrown if the J2EE name space cannot be initialized on the server.
java.io.IOException
- Thrown if an error occurs while opening the .ear file or the client application .jar file, or if an error occurs while saving the .ear file to the temporary directory.
java.util.zip.ZipException
- Thrown if a ZIP error occurs while processing the .ear file or the client application .jar file.
java.lang.ClassNotFoundException
- Thrown if the main class cound not be found.
java.lang.NoSuchMethodException
- Thrown if no main method exists in the main class.
java.lang.IllegalAccessException
- Thrown if launchClient doesn't have access to the main method in the main class.
java.lang.reflect.InvocationTargetException
- This is a checked exception that wraps an exception thrown by an invoked method or constructor.
javax.naming.NamingException
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException