launching one class file from inside another?

So given the following: public void notify is simply setting variables, instances and launching methods. However, in one method, I need to run something called a PluggableScanner. PluggableScanner is actually a compiled class file written by someone else. I need to perform some functions, then execute this class file. The problem I am having is HOW?

...

publicvoid notify(Object sender,int msg, Object arg)

{

switch (msg)

{

case APP_INIT:

String os =null;

os = System.getProperty("os.name");

//os = "Linux"; //Uncomment this line and comment out the line above to troubleshoot OS variable

dataDir =new File(context.getDataDirectory());

String files[] = dataDir.list();

String params =null;

context = (IApplicationContext) arg;

workspace = (IWorkspace) context.getFeature("workspace");

//Logging

System.out.println("The Tuner Workspace is defined as: " + workspace);

System.out.println("Channel Data Directory is: " + dataDir);

context.log(26001,8,"Data Directory is: " + dataDir);

for(i = 0; i < files.length;i++)

{

String f = files[i];

System.out.println("Current element in directory list array is: " + f);

context.log(26001,8,"Current element in directory list array is: " + f);

// shell and/or vbscripts must be copied into the data directory of the channel

copyToData(context, f);

}

executeScripts(context, os);

executePluggable();

break;

case APP_START:

break;

case APP_STOP:

break;

}

}

...

privateboolean executePluggable()

{

boolean returnCode =false;

try

{

//PluggableScanner.notify();

}

catch (Exception e)

{

}

return returnCode;

}

[3157 byte] By [curtis_rowell@bmc.coma] at [2007-11-27 7:52:31]
# 1
If the class and the method you want to call are public, then all you have to do is add the class file into your classpath, then invoke it like any other method on any other class.
paulcwa at 2007-7-12 19:33:45 > top of Java-index,Java Essentials,New To Java...
# 2
That is exactly my question. HOW would I invoke it?Second, I won't have a class path which I can modify. This must be done entirely with in the confines of my own script. Now, if I can modify the classpath for this instance, perhaps that could be accomplished.
curtis_rowell@bmc.coma at 2007-7-12 19:33:45 > top of Java-index,Java Essentials,New To Java...
# 3

Wait. You can't change the classpath sent to the JVM? Why not?

How to invoke it? Invoke it like anything else:

List bob = new List();

System.out.println(bob.size());

//or

ThisClassYouWantToUse bob = new ThisClassYouWantToUse();

bob.whatever();

Using an external class isn't unusual. That's what the libraries are, both the libraries in the JRE and libraries for other packages.

It sounds like the problem for you isn't that you're using a different class, but rather that there may be a lot of arbitrary restrictions preventing you from doing the normal thing.

paulcwa at 2007-7-12 19:33:45 > top of Java-index,Java Essentials,New To Java...