Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want to leverage JDT you have to start eclipse. You can use the extension point "org.eclipse.core.runtime.applications" to create a minimal application that starts from the command line.</p> <ol> <li>Create a new Plugin-Project. </li> <li>Add "org.eclipse.core.runtime" and "org.eclipse.core.resources" to the dependencies.</li> <li>Create an extension for "org.eclipse.core.runtime.applications".</li> <li>Create a class that implements "org.eclipse.equinox.app.IApplication" and reference it in your extension.</li> </ol> <p>My plugin.xml looks like this:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;?eclipse version="3.4"?&gt; &lt;plugin&gt; &lt;extension id="id2" point="org.eclipse.core.runtime.applications"&gt; &lt;application cardinality="singleton-global" thread="main" visible="true"&gt; &lt;run class="testapplication.Application1"&gt; &lt;/run&gt; &lt;/application&gt; &lt;/extension&gt; &lt;/plugin&gt; </code></pre> <p>MANIFEST.MF:</p> <pre><code>Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: TestApplication Bundle-SymbolicName: TestApplication;singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-Activator: testapplication.Activator Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 </code></pre> <p>Application1.java:</p> <pre><code>package testapplication; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplicationContext; public class Application1 implements IApplication { @Override public Object start(IApplicationContext context) throws Exception { System.out.println("Hello eclipse at " + ResourcesPlugin.getWorkspace().getRoot().getRawLocation()); return IApplication.EXIT_OK; } @Override public void stop() { // nothing to do at the moment } } </code></pre> <p>Output is:</p> <blockquote> <p>Hello eclipse at D:/Arne/workspaces/runtime-TestApplication.id2</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload