[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: IJobManager

Since I am really new to RCP / Eclipse Plug-in, please help on this.
Thank you very much!!!!

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!!!