| [news.eclipse.platform] Re: IJobManager |
I got the Eclipse 3.2 SDK and run the Hello World program with org.eclipse.core.runtime_3.2.0.v20060603.jar, org.eclipse.equinox.common_3.2.0.v20060603.jar and org.eclipse.osgi_3.2.1.R32x_v20060919.jar. However, the program still throws java.lang.NoClassDefFoundError same as before. Could you please help?
Besides, I cannot find the shutdown() method from the help (http://help.eclipse.org/help32/index.jsp). Which method do you refer exactly?
Thank you!!!
John Arthorne wrote:
The Jobs plugin in Eclipse 3.2 can be run outside of Eclipse, but I don't think this was true for the 3.0 version you are referencing. I suggest obtaining Eclipse platform 3.2, and then you can run standalone using the two jars org.eclipse.core.jobs_3.2.0 and org.eclipse.equinox.common_3.2.0. The only additional requirement is that you must call JobManager.shutdown() at the end of your application to shut down the job manager's thread pool. The Job API in version 3.2 is fully compatible with the API in version 3.0, so you can run the same client code against both versions.
--
Man wrote:
I want to use the package org.eclipse.core.runtime.jobs as my base to create a job manager suiting my need. I can run the following HelloWorld program successfully inside Rational.
public class Test {
public static void main(String[] args) {
Job job = new Job("My First Job") {
protected IStatus run(IProgressMonitor monitor) {
System.out.println("Hello World (from a background job)");
return Status.OK_STATUS;
}
};
job.setPriority(Job.SHORT);
job.schedule(); // start as soon as possible
}
}
However, I cannot run it through the command below:
"C:Program FilesJavajre1.5.0_06binjava.exe" -cp "C:Program
FilesIBMRationalSDP6.0eclipsepluginsorg.eclipse.core.runtime_3.0.1runtime.jar;C:Program
FilesIBMRationalSDP6.0eclipsepluginsorg.eclipse.osgi_3.0.1osgi.jar" Test
Now I have the following questions:
1. It seems to me that this package is a plugin of Eclipse. Is this the reason why the program cannot be run outside of eclipse? (Eclipse plugin would not work outside Eclipse??)
2. Is there any way that I can use this package through command line? 3. Could jobs be scheduled across JVM? across machine?
Thank you very much for any help!!!