Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 94183 Details for
Bug 224846
Cannot create Java EE artifacts: servlet, beans, etc.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
224846_patch.txt (text/plain), 2.96 KB, created by
Kaloyan Raev
on 2008-03-31 05:26:14 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Kaloyan Raev
Created:
2008-03-31 05:26:14 EDT
Size:
2.96 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.j2ee >Index: j2eecreation/org/eclipse/jst/j2ee/internal/project/WTPJETEmitter.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/WTPJETEmitter.java,v >retrieving revision 1.19 >diff -u -r1.19 WTPJETEmitter.java >--- j2eecreation/org/eclipse/jst/j2ee/internal/project/WTPJETEmitter.java 31 Oct 2007 23:20:02 -0000 1.19 >+++ j2eecreation/org/eclipse/jst/j2ee/internal/project/WTPJETEmitter.java 31 Mar 2008 09:24:20 -0000 >@@ -45,6 +45,7 @@ > import org.eclipse.core.resources.ProjectScope; > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.FileLocator; > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.NullProgressMonitor; >@@ -66,6 +67,7 @@ > import org.eclipse.jdt.core.JavaModelException; > import org.eclipse.jdt.launching.JavaRuntime; > import org.eclipse.jem.util.logger.proxy.Logger; >+import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; > import org.eclipse.jst.j2ee.internal.plugin.J2EEPluginResourceHandler; > import org.eclipse.osgi.util.ManifestElement; > import org.osgi.framework.Bundle; >@@ -440,8 +442,12 @@ > IPath runtimeLibFullPath = null; > URL fullurl = null; > if (elements == null) { >- if (bundle.getLocation().endsWith(".jar")) //$NON-NLS-1$ >- runtimeLibFullPath = getJarredPluginPath(bundle); >+ if (bundle.getLocation().endsWith(".jar")) >+ try { >+ runtimeLibFullPath = getJarredPluginPath(bundle); >+ } catch (IOException e) { >+ J2EEPlugin.logError(e); >+ } > appendToClassPath(runtimeLibFullPath,project); > return; > } >@@ -458,8 +464,12 @@ > Logger.getLogger().logError(e); > } > //TODO handle jar'ed plugins, this is a hack for now, need to find proper bundle API >- if (bundle.getLocation().endsWith(".jar")) //$NON-NLS-1$ >- runtimeLibFullPath = getJarredPluginPath(bundle); >+ if (bundle.getLocation().endsWith(".jar")) >+ try { >+ runtimeLibFullPath = getJarredPluginPath(bundle); >+ } catch (IOException e) { >+ J2EEPlugin.logError(e); >+ } > if (!"jar".equals(runtimeLibFullPath.getFileExtension()) && !"zip".equals(runtimeLibFullPath.getFileExtension())) //$NON-NLS-1$ //$NON-NLS-2$ > continue; > appendToClassPath(runtimeLibFullPath,project); >@@ -479,9 +489,9 @@ > } > } > >- private IPath getJarredPluginPath(Bundle bundle) { >+ private IPath getJarredPluginPath(Bundle bundle) throws IOException { > Path runtimeLibFullPath = null; >- String jarPluginLocation = bundle.getLocation().substring(7); >+ String jarPluginLocation = FileLocator.getBundleFile(bundle).getPath(); > Path jarPluginPath = new Path(jarPluginLocation); > // handle case where jars are installed outside of eclipse installation > if (jarPluginPath.isAbsolute())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 224846
: 94183