Can't launch Java program from Eclipse?
I can't run my Java code without getting this error message: 

> An internal error occurred during: "Launching thing".

> org/eclipse/jdt/debug/core/JDIDebugModel


Here's the code:

    import javax.swing.JOptionPane;
    
    class thing {
    	public static void main(String[] args){
    	
    		String f = JOptionPane.showInputDialog("First number: ");
    		String s = JOptionPane.showInputDialog("Second Number: ");
    	
    		int first = Integer.parseInt(f);
    		int second = Integer.parseInt(s);
    		int sum = first + second;
    		
    		JOptionPane.showMessageDialog(null, "Answer: " + sum, "Title", JOptionPane.PLAIN_MESSAGE);
    	}
    }


**Error Log:**

![enter image description here][1] 

**Which contains:**

    eclipse.buildId=M20110909-1335
    java.version=1.7.0_01
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86
    
    This is a continuation of log file C:\Users\Cole\workspace\.metadata\.bak_0.log
    Created Time: 2012-02-05 13:11:35.180
    
    Error
    Sun Feb 05 13:11:55 CST 2012
    Plug-in org.eclipse.jdt.debug.ui was unable to load class org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut.
    
    org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.jdt.debug.ui (259).
    	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
    	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
    	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
    	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
    	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
    	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getDelegate(LaunchShortcutExtension.java:410)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getLaunchableResource(LaunchShortcutExtension.java:527)
    	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getLaunchableResource(LaunchingResourceManager.java:414)
    	at org.eclipse.debug.internal.ui.contextlaunching.ContextRunner.selectAndLaunch(ContextRunner.java:117)
    	at org.eclipse.debug.internal.ui.contextlaunching.ContextRunner.launch(ContextRunner.java:82)
    	at org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction.run(AbstractLaunchToolbarAction.java:79)
    	at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.runWithEvent(AbstractLaunchHistoryAction.java:404)
    	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
    	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
    	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
    	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    Caused by: org.osgi.framework.BundleException: The activator org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin for bundle org.eclipse.jdt.debug.ui is invalid
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171)
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
    	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
    	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
    	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    	... 51 more
    Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/debug/core/IJavaHotCodeReplaceListener
    	at java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    	at java.lang.Class.getConstructor0(Unknown Source)
    	at java.lang.Class.newInstance0(Unknown Source)
    	at java.lang.Class.newInstance(Unknown Source)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
    	... 57 more
    Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	... 63 more

**What's happening here?**

  [1]: http://i.stack.imgur.com/hqbwu.png
Can't launch Java program from Eclipse?
===

I can't run my Java code without getting this error message: 

> An internal error occurred during: "Launching thing".

> org/eclipse/jdt/debug/core/JDIDebugModel


Here's the code:

    import javax.swing.JOptionPane;
    
    class thing {
    	public static void main(String[] args){
    	
    		String f = JOptionPane.showInputDialog("First number: ");
    		String s = JOptionPane.showInputDialog("Second Number: ");
    	
    		int first = Integer.parseInt(f);
    		int second = Integer.parseInt(s);
    		int sum = first + second;
    		
    		JOptionPane.showMessageDialog(null, "Answer: " + sum, "Title", JOptionPane.PLAIN_MESSAGE);
    	}
    }


**Error Log:**

![enter image description here][1] 

**Which contains:**

    eclipse.buildId=M20110909-1335
    java.version=1.7.0_01
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86
    
    This is a continuation of log file C:\Users\Cole\workspace\.metadata\.bak_0.log
    Created Time: 2012-02-05 13:11:35.180
    
    Error
    Sun Feb 05 13:11:55 CST 2012
    Plug-in org.eclipse.jdt.debug.ui was unable to load class org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut.
    
    org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.jdt.debug.ui (259).
    	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
    	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
    	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
    	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
    	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
    	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getDelegate(LaunchShortcutExtension.java:410)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getLaunchableResource(LaunchShortcutExtension.java:527)
    	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getLaunchableResource(LaunchingResourceManager.java:414)
    	at org.eclipse.debug.internal.ui.contextlaunching.ContextRunner.selectAndLaunch(ContextRunner.java:117)
    	at org.eclipse.debug.internal.ui.contextlaunching.ContextRunner.launch(ContextRunner.java:82)
    	at org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction.run(AbstractLaunchToolbarAction.java:79)
    	at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.runWithEvent(AbstractLaunchHistoryAction.java:404)
    	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
    	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
    	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
    	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    Caused by: org.osgi.framework.BundleException: The activator org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin for bundle org.eclipse.jdt.debug.ui is invalid
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171)
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
    	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
    	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
    	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    	... 51 more
    Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/debug/core/IJavaHotCodeReplaceListener
    	at java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    	at java.lang.Class.getConstructor0(Unknown Source)
    	at java.lang.Class.newInstance0(Unknown Source)
    	at java.lang.Class.newInstance(Unknown Source)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
    	... 57 more
    Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	... 63 more

**What's happening here?**

  [1]: http://i.stack.imgur.com/hqbwu.png