Results 1 to 3 of 3
- 05-14-2013, 03:30 PM #1
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
getResource returns null in Plugin project
Hello everyone!
I looked so many days for the solution, but still canīt fix my problem.
I have this code:
view plaincopy to clipboardprint?
Note: Text content in the code blocks is automatically word-wrapped
Java Code:ResourceSet resSet = new ResourceSetImpl(); String test= "/C://Users/Jim/Desktop/text.xml"; URI uri= URI.createURI(test, true); Resource resource = resSet.getResource(uri, true);
This works perfectly in a java project.
I tried it now in a Plugin Project, but the resource varible is always null!
Please, can someone help me?
Best regards
Ken
- 05-14-2013, 04:00 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 27
Re: getResource returns null in Plugin project
Can you explain what classes we're looking at here?
Saves us having to Google to find out what framework you;re talking about.Please do not ask for code as refusal often offends.
** This space for rent **
- 05-14-2013, 05:48 PM #3
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
Re: getResource returns null in Plugin project
Hi,
maybe I can explain a bit better, I think I know where the error comes, but not how to prevent it.
My Plugin Project opens a second workspace.
There I can right click on a project and choose my own menu.
After clicking on this menu, the code (above) will running.
So it seems the code makes problem because I call it from a second workspace.
Any idea?
Similar Threads
-
ClassLoader.getSystemResource() returns null
By SVENeRGy in forum New To JavaReplies: 10Last Post: 01-07-2012, 04:06 PM -
ArrayList returns null
By aborgeld in forum New To JavaReplies: 6Last Post: 04-01-2011, 02:32 PM -
XML and SAX - class returns 'null'
By Laffel in forum Advanced JavaReplies: 2Last Post: 03-07-2011, 10:14 PM -
Splashscreen returns null
By Charlie161 in forum AWT / SwingReplies: 2Last Post: 03-04-2011, 02:25 PM -
getImplementationVersion() returns null
By newbiejava in forum New To JavaReplies: 22Last Post: 09-12-2010, 10:31 AM
Bookmarks