Below is the plugin code that i have tried to reuse from an old code that i got my hands on.
The plugin just wont run properly.
I have copied the plugin part of the code.
Please help me trouble shoot the issue.
- on running in Eclipse Helios

UPDATED new error image

but i am using JDK 1.6
UPDATED new error image - Once i was able to run the plugin in RAD in debug mode, but was not able to install it in rad as a plugin. Since the plugin jar that was created, was not detected in Eclipse or RAD on start up.
the idea trying to achieve here is to get the <project folder location> when user tries to call the plugin. and pass that as a parameter to a stand alone code.
Activator.java
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "PluginName";
// The shared instance
private static Activator plugin;
public Activator() {
plugin = this;
}
public void start(BundleContext context) throws Exception {
System.out.println("Loading the PluginName");
super.start(context);
}
public void stop(BundleContext context) throws Exception {
plugin = null;
System.out.println("Exiting the PluginName");
super.stop(context);
}
public static Activator getDefault() {
return plugin;
}
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
FindUnwantedJarAction.java
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
public class FindUnwantedJarAction implements IObjectActionDelegate {
private IStructuredSelection selection;
public void setActivePart(IAction arg0, IWorkbenchPart arg1) {
// TODO Auto-generated method stub
}
public void run(IAction arg0) {
IProject project = (IProject) selection.getFirstElement();
String projName = project.getName();
String projectLocation = project.getLocation().toString();
//call another class with this parameter
}
public void selectionChanged(IAction arg0, ISelection paramSelection) {
this.selection = (IStructuredSelection) paramSelection;
}
}
Plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IProject"
adaptable="true"
id="core.UnwantedJar">
<menu
label="Find Unwanted Jars"
path="additions"
id="FindUnJar.menu1">
<separator
name="group1">
</separator>
</menu>
<action
label="Find!!!"
class="core.marksman.action.FindUnwantedJarAction"
menubarPath="FindUnJar.menu1/group1"
enablesFor="1"
id="CVSLocal.newAction">
</action>
</objectContribution>
</extension>
</plugin>
You should also give your MANIFEST.MF for the full diagnosis, but the most probable cause is that you are running your RAD using a different JDK than the one your development Eclipse instance is running with (and it is earlier than your bundle target environment which is set to JavaSE-1.6 in your MANIFEST.MF).
That might be the reason you could successfully run the RAD in the Debug mode but not as a standalone application. Please look at the log of your RAD instance and see the “java.version=” value. It should be 1.6… or later.