Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Help with ClassPathInitializer: java.io.IOException: The filename, directory name, or volume label syntax is incorrect

Hello

I have setup a extension for using a ClassPath variable with the ClassPathInitializer extension.

When running against the plugin directory extracted from the jar by hand, everything is fine, but when running againt the plugin delivered as a jar from an update site installation, I got this exception:

Any idea how to force Eclipse to expand the jar or get the correct path??

Eclipse SDK Version: 3.2.1 Build id: M20060921-0945

1/ Code for setting the classpath variable
	JavaCore.setClasspathVariable(
		NDTRTS,
		Activator.getDefault().getInstallPath().append(ndtrts).addFileExtension("jar"),
		new NullProgressMonitor());



2/ Code of Activator.Activator.getDefault().getInstallPath()
	public static URL getInstallURL() {
		return getDefault().getBundle().getEntry("/");
	}

	public static IPath getInstallPath() {
		File file;

		if (installPath == null) {
			try {
				file     = new File(
				FileLocator.toFileURL(FileLocator.resolve(getInstallURL())).getFile());
				System.err.println(file.toString());
				installPath = new Path(file.getCanonicalPath());
			} catch (Exception exception) {
				log(exception);
				installPath = null;
			}
		}

		return installPath;
	}



java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:395)
at java.io.File.getCanonicalPath(File.java:531)
at com.anubex.ndt.core.Activator.getInstallPath(Activator.java:169)
at com.anubex.ndt.core.builder.ClasspathVariableInitializer.initialize(ClasspathVariableInitializer.java:28)
at org.eclipse.jdt.core.JavaCore.getClasspathVariable(JavaCore.java:1589)
at org.eclipse.jdt.core.JavaCore.getResolvedVariablePath(JavaCore.java:2767)
at org.eclipse.jdt.core.JavaCore.getResolvedClasspathEntry(JavaCore.java:2673)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2149)
at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspath(ClasspathEntry.java:1312)
at org.eclipse.jdt.internal.core.SetClasspathOperation.verify(SetClasspathOperation.java:840)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:773)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3016)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3032)
at com.anubex.ndt.core.builder.NaturalStudioNature.addRunTimeJarsToProjectClasspath(NaturalStudioNature.java:82)
at com.anubex.ndt.core.builder.NaturalStudioNature.configure(NaturalStudioNature.java:50)
at org.eclipse.core.internal.resources.NatureManager$1.run(NatureManager.java:140)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.resources.NatureManager.configureNature(NatureManager.java:155)
at org.eclipse.core.internal.resources.NatureManager.configureNatures(NatureManager.java:200)
at org.eclipse.core.internal.resources.Project.basicSetDescription(Project.java:65)
at org.eclipse.core.internal.resources.Project.setDescription(Project.java:982)
at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1010)
at com.anubex.ndt.core.builder.ToggleNatureAction.toggleNature(ToggleNatureAction.java:91)
at com.anubex.ndt.core.builder.ToggleNatureAction.run(ToggleNatureAction.java:37)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254)
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$5.handleEvent(ActionContributionItem.java:400)
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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)




Back to the top