Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 167245

Summary: [launching] Problems occurred when invoking code from plug-in: "org.eclipse.jface"
Product: [Eclipse Project] JDT Reporter: Timothy Hodkinson <timothy_hodkinson>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, Michael_Rennie, sarika.sinha
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard: stalebug

Description Timothy Hodkinson CLA 2006-12-08 11:07:30 EST
When i click on "Run",, choose "Java Application" and then choose my application from the list, instead of running my application, an error is generated in the error log as follows:
Problems occurred when invoking code from plug-in: "org.eclipse.jface"
java.lang.IllegalArgumentException: Path for project must have only one segment.
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:62)
	at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:164)
	at org.eclipse.jdt.internal.core.JavaModel.getJavaProject(JavaModel.java:189)
	at org.eclipse.jdt.launching.JavaRuntime.getJavaProject(JavaRuntime.java:1197)
	at org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock.setDefaultWorkingDir(WorkingDirectoryBlock.java:281)
	at org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock.initializeFrom(WorkingDirectoryBlock.java:342)
	at org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab.initializeFrom(JavaArgumentsTab.java:176)
	at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:86)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:655)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$6.run(LaunchConfigurationTabGroupViewer.java:548)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:565)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:529)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:928)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$4.selectionChanged(LaunchConfigurationsDialog.java:547)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:839)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:843)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
	at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:837)
	at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1143)
	at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1163)
	at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:236)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:230)
	at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:404)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1086)
	at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:383)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:387)
	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:329)
	at org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction.run(AbstractLaunchToolbarAction.java:79)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	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.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 1 Olivier Thomann CLA 2006-12-08 14:29:53 EST
Moving to Platform/Resources.
Could you please provide build id and steps to reproduce?
Comment 2 Timothy Hodkinson CLA 2006-12-11 11:01:03 EST
Build iD:
Eclipse SDK Version: 3.2.1
Build id: M20060921-0945
For Windows. running on Windows 2000,
Steps to reporduce: 
1. Created a java project for the Googel web Toolkit (http://code.google.com/webtoolkit/)
2. Build all. Right click on the Project and choose "Run.." OR "Run.." form teh Run menu OR click on the green Run button
3. On the "Create, manage and run configurations" dialog box that appears, choose, "Java Application", then the name of my project below it on the tree
4. Immediately a dialog box appears, saying "An error has occurred: See error log for more details"
Comment 3 John Arthorne CLA 2008-06-27 15:54:48 EDT
JDT Debug must be passing in project name containing a '/' character, which is not allowed.
Comment 4 Sarika Sinha CLA 2014-01-03 06:33:00 EST
I am trying it out in eclipse 4.3.1.
Eclipse does not allow to create a java project with "/", so Java Project name as "http://code.google.com/webtoolkit/" 
can not be created.
Comment 5 Jay Arthanareeswaran CLA 2014-01-03 07:21:27 EST
I noticed this is an old bug.

Tim, did you have a chance to try this out with a more recent version of eclipse?
Comment 6 Michael Rennie CLA 2014-01-22 14:19:07 EST
(In reply to Jayaprakash Arthanareeswaran from comment #5)
> I noticed this is an old bug.
> 
> Tim, did you have a chance to try this out with a more recent version of
> eclipse?

This is still (sort of) reproducible in 4.4 - I could not get the default working directory to fail because I could not create a project with a '/' in it, but there are places we allow you to enter project information with no sanity checks.

Steps:

1. create a launch configuration for a Java App
2. in the launch dialog, pick the class you are going to launch
3. enter a (non-default) working directory with a '/' name in it
4. launch
5. check the error log

The problem is step 3 above - we allow you to enter a project name that can have the offending character(s) with no checks. This same problem also affects the Project field on the Main tab.
Comment 7 Eclipse Genie CLA 2018-09-21 13:54:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.